<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns, MagicHash, Rank2Types #-}</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Module      : Data.Text.Internal.Fusion.Common</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Copyright   : (c) Bryan O'Sullivan 2009, 2012</span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- License     : BSD-style</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Maintainer  : bos@serpentine.com</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Stability   : experimental</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Portability : GHC</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- /Warning/: this is an internal module, and does not have a stable</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- API or name. Functions in this module may not check or enforce</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- preconditions expected by public modules. Use at your own risk!</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Common stream fusion functionality for text.</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Text.Internal.Fusion.Common</span><span>
</span><span id="line-18"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-19"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Creation and elimination</span></span><span>
</span><span id="line-20"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#singleton"><span class="hs-identifier">singleton</span></a></span><span>
</span><span id="line-21"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#streamList"><span class="hs-identifier">streamList</span></a></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unstreamList"><span class="hs-identifier">unstreamList</span></a></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#streamCString%23"><span class="hs-identifier">streamCString#</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Basic interface</span></span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#cons"><span class="hs-identifier">cons</span></a></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#snoc"><span class="hs-identifier">snoc</span></a></span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#append"><span class="hs-identifier">append</span></a></span><span>
</span><span id="line-29"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#head"><span class="hs-identifier">head</span></a></span><span>
</span><span id="line-30"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#uncons"><span class="hs-identifier">uncons</span></a></span><span>
</span><span id="line-31"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#last"><span class="hs-identifier">last</span></a></span><span>
</span><span id="line-32"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#tail"><span class="hs-identifier">tail</span></a></span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#init"><span class="hs-identifier">init</span></a></span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#null"><span class="hs-identifier">null</span></a></span><span>
</span><span id="line-35"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#lengthI"><span class="hs-identifier">lengthI</span></a></span><span>
</span><span id="line-36"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#compareLengthI"><span class="hs-identifier">compareLengthI</span></a></span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#isSingleton"><span class="hs-identifier">isSingleton</span></a></span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Transformations</span></span><span>
</span><span id="line-40"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#map"><span class="hs-identifier">map</span></a></span><span>
</span><span id="line-41"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#intercalate"><span class="hs-identifier">intercalate</span></a></span><span>
</span><span id="line-42"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#intersperse"><span class="hs-identifier">intersperse</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Case conversion</span></span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><span class="hs-comment">-- $case</span></span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toCaseFold"><span class="hs-identifier">toCaseFold</span></a></span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toLower"><span class="hs-identifier">toLower</span></a></span><span>
</span><span id="line-48"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toTitle"><span class="hs-identifier">toTitle</span></a></span><span>
</span><span id="line-49"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toUpper"><span class="hs-identifier">toUpper</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Justification</span></span><span>
</span><span id="line-52"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#justifyLeftI"><span class="hs-identifier">justifyLeftI</span></a></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Folds</span></span><span>
</span><span id="line-55"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl"><span class="hs-identifier">foldl</span></a></span><span>
</span><span id="line-56"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl%27"><span class="hs-identifier">foldl'</span></a></span><span>
</span><span id="line-57"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl1"><span class="hs-identifier">foldl1</span></a></span><span>
</span><span id="line-58"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl1%27"><span class="hs-identifier">foldl1'</span></a></span><span>
</span><span id="line-59"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldr"><span class="hs-identifier">foldr</span></a></span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldr1"><span class="hs-identifier">foldr1</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Special folds</span></span><span>
</span><span id="line-63"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#concat"><span class="hs-identifier">concat</span></a></span><span>
</span><span id="line-64"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#concatMap"><span class="hs-identifier">concatMap</span></a></span><span>
</span><span id="line-65"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#any"><span class="hs-identifier">any</span></a></span><span>
</span><span id="line-66"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#all"><span class="hs-identifier">all</span></a></span><span>
</span><span id="line-67"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#maximum"><span class="hs-identifier">maximum</span></a></span><span>
</span><span id="line-68"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#minimum"><span class="hs-identifier">minimum</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Construction</span></span><span>
</span><span id="line-71"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Scans</span></span><span>
</span><span id="line-72"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#scanl"><span class="hs-identifier">scanl</span></a></span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Generation and unfolding</span></span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#replicateCharI"><span class="hs-identifier">replicateCharI</span></a></span><span>
</span><span id="line-76"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#replicateI"><span class="hs-identifier">replicateI</span></a></span><span>
</span><span id="line-77"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unfoldr"><span class="hs-identifier">unfoldr</span></a></span><span>
</span><span id="line-78"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unfoldrNI"><span class="hs-identifier">unfoldrNI</span></a></span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Substrings</span></span><span>
</span><span id="line-81"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Breaking strings</span></span><span>
</span><span id="line-82"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#take"><span class="hs-identifier">take</span></a></span><span>
</span><span id="line-83"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#drop"><span class="hs-identifier">drop</span></a></span><span>
</span><span id="line-84"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#takeWhile"><span class="hs-identifier">takeWhile</span></a></span><span>
</span><span id="line-85"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#dropWhile"><span class="hs-identifier">dropWhile</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Predicates</span></span><span>
</span><span id="line-88"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#isPrefixOf"><span class="hs-identifier">isPrefixOf</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Searching</span></span><span>
</span><span id="line-91"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#elem"><span class="hs-identifier">elem</span></a></span><span>
</span><span id="line-92"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#filter"><span class="hs-identifier">filter</span></a></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Indexing</span></span><span>
</span><span id="line-95"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#findBy"><span class="hs-identifier">findBy</span></a></span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#indexI"><span class="hs-identifier">indexI</span></a></span><span>
</span><span id="line-97"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#findIndexI"><span class="hs-identifier">findIndexI</span></a></span><span>
</span><span id="line-98"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#countCharI"><span class="hs-identifier">countCharI</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Zipping and unzipping</span></span><span>
</span><span id="line-101"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#zipWith"><span class="hs-identifier">zipWith</span></a></span><span>
</span><span id="line-102"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier">Bool</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier">Char</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier">Eq</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier">Int</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier">Integral</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier">Maybe</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-105"></span><span>                </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier">Ord</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier">Ordering</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#."><span class="hs-operator">(.)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator">($)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator">(+)</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator">(*)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator">(++)</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-106"></span><span>                </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator">(&amp;&amp;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier">fromIntegral</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier">otherwise</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">L</span></span><span>
</span><span id="line-108"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">P</span></span><span>
</span><span id="line-109"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-identifier">shiftL</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Char.html#isLetter"><span class="hs-identifier">isLetter</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier">isSpace</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Int.html#"><span class="hs-identifier">Data.Int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier">Int64</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html"><span class="hs-identifier">Data.Text.Internal.Fusion.Types</span></a></span><span>
</span><span id="line-113"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.CaseMapping.html"><span class="hs-identifier">Data.Text.Internal.Fusion.CaseMapping</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.CaseMapping.html#foldMapping"><span class="hs-identifier">foldMapping</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.CaseMapping.html#lowerMapping"><span class="hs-identifier">lowerMapping</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.CaseMapping.html#titleMapping"><span class="hs-identifier">titleMapping</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-114"></span><span>                                     </span><span class="annot"><a href="Data.Text.Internal.Fusion.CaseMapping.html#upperMapping"><span class="hs-identifier">upperMapping</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html"><span class="hs-identifier">Data.Text.Internal.Fusion.Size</span></a></span><span>
</span><span id="line-116"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#"><span class="hs-identifier">GHC.Prim</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier">Addr#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#chr%23"><span class="hs-identifier">chr#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#indexCharOffAddr%23"><span class="hs-identifier">indexCharOffAddr#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ord%23"><span class="hs-identifier">ord#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-117"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#"><span class="hs-identifier">GHC.Types</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier">Char</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier">Int</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#singleton"><span class="hs-identifier hs-type">singleton</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-120"></span><span id="singleton"><span class="annot"><span class="annottext">singleton :: Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#singleton"><span class="hs-identifier hs-var hs-var">singleton</span></a></span></span><span> </span><span id="local-6989586621679106860"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106860"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Step Bool Char) -&gt; Bool -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Step Bool Char
</span><a href="#local-6989586621679106858"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679106858"><span class="annot"><span class="annottext">next :: Bool -&gt; Step Bool Char
</span><a href="#local-6989586621679106858"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool -&gt; Step Bool Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106860"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-122"></span><span>          </span><span class="annot"><a href="#local-6989586621679106858"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step Bool Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-123"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#singleton"><span class="hs-pragma hs-type">singleton</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span id="local-6989586621679107086"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#streamList"><span class="hs-identifier hs-type">streamList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679107086"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679107086"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-126"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#streamList"><span class="hs-pragma hs-type">streamList</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-127"></span><span id="streamList"><span class="annot"><span class="annottext">streamList :: forall a. [a] -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Common.html#streamList"><span class="hs-identifier hs-var hs-var">streamList</span></a></span></span><span> </span><span id="local-6989586621679106854"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679106854"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; Step [a] a) -&gt; [a] -&gt; Size -&gt; Stream a
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Step [a] a
forall {a}. [a] -&gt; Step [a] a
</span><a href="#local-6989586621679106853"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679106854"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span>
</span><span id="line-128"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679106853"><span class="annot"><span class="annottext">next :: [a] -&gt; Step [a] a
</span><a href="#local-6989586621679106853"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step [a] a
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-129"></span><span>          </span><span class="annot"><a href="#local-6989586621679106853"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679106851"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106851"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679106850"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679106850"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; Step [a] a
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106851"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679106850"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span id="local-6989586621679107083"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unstreamList"><span class="hs-identifier hs-type">unstreamList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679107083"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679107083"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-132"></span><span id="unstreamList"><span class="annot"><span class="annottext">unstreamList :: forall a. Stream a -&gt; [a]
</span><a href="Data.Text.Internal.Fusion.Common.html#unstreamList"><span class="hs-identifier hs-var hs-var">unstreamList</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106849"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106849"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106848"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106848"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106847"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106847"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; [a]
</span><a href="#local-6989586621679106846"><span class="hs-identifier hs-var">unfold</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106848"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-133"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679106846"><span class="annot"><span class="annottext">unfold :: s -&gt; [a]
</span><a href="#local-6989586621679106846"><span class="hs-identifier hs-var hs-var">unfold</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106845"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106845"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106849"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106845"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-134"></span><span>                        </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-135"></span><span>                        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106843"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106843"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; [a]
</span><a href="#local-6989586621679106846"><span class="hs-identifier hs-var">unfold</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106843"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-136"></span><span>                        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106842"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106842"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106841"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106841"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106842"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; [a]
</span><a href="#local-6989586621679106846"><span class="hs-identifier hs-var">unfold</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106841"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-137"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unstreamList"><span class="hs-pragma hs-type">unstreamList</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span class="hs-pragma">{-# RULES</span><span> </span><span class="annot"><span class="hs-pragma">&quot;STREAM streamList/unstreamList fusion&quot;</span></span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679106840"><span class="annot"><a href="#local-6989586621679106840"><span class="hs-pragma hs-var">s</span></a></span></span><span class="hs-pragma">.</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#streamList"><span class="hs-pragma hs-type">streamList</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unstreamList"><span class="hs-pragma hs-type">unstreamList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106840"><span class="hs-pragma hs-type">s</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="#local-6989586621679106840"><span class="hs-pragma hs-type">s</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="hs-comment">-- | Stream the UTF-8-like packed encoding used by GHC to represent</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- constant strings in generated code.</span><span>
</span><span id="line-143"></span><span class="hs-comment">--</span><span>
</span><span id="line-144"></span><span class="hs-comment">-- This encoding uses the byte sequence &quot;\xc0\x80&quot; to represent NUL,</span><span>
</span><span id="line-145"></span><span class="hs-comment">-- and the string is NUL-terminated.</span><span>
</span><span id="line-146"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#streamCString%23"><span class="hs-identifier hs-type">streamCString#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-147"></span><span id="streamCString%23"><span class="annot"><span class="annottext">streamCString# :: Addr# -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#streamCString%23"><span class="hs-identifier hs-var hs-var">streamCString#</span></a></span></span><span> </span><span id="local-6989586621679106839"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679106839"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Step Int Char) -&gt; Int -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Step Int Char
</span><a href="#local-6989586621679106838"><span class="hs-identifier hs-var">step</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span>
</span><span id="line-148"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-149"></span><span>    </span><span id="local-6989586621679106838"><span class="annot"><span class="annottext">step :: Int -&gt; Step Int Char
</span><a href="#local-6989586621679106838"><span class="hs-identifier hs-var hs-var">step</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106819"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106819"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-150"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106818"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step Int Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-151"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106818"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x7f</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Step Int Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char# -&gt; Char
</span><a href="../../ghc-prim/src/GHC.Types.html#C%23"><span class="hs-identifier hs-var">C#</span></a></span><span> </span><span class="annot"><span class="annottext">Char#
</span><a href="#local-6989586621679106816"><span class="hs-identifier hs-var">b#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106819"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106818"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xdf</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106810"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621679106810"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="#local-6989586621679106809"><span class="hs-identifier hs-var">chr</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; Int -&gt; Char
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106818"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xc0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679106808"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-153"></span><span>                      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Step Int Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106810"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106819"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106818"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xef</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106801"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621679106801"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="#local-6989586621679106809"><span class="hs-identifier hs-var">chr</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; Int -&gt; Char
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106818"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xe0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">12</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-155"></span><span>                                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679106808"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-156"></span><span>                                       </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679106808"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-157"></span><span>                      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Step Int Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106801"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106819"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106792"><span class="annot"><span class="annottext">c :: Char
</span><a href="#local-6989586621679106792"><span class="hs-identifier hs-var hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="#local-6989586621679106809"><span class="hs-identifier hs-var">chr</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Char) -&gt; Int -&gt; Char
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106818"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0xf0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">18</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-159"></span><span>                                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679106808"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">12</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-160"></span><span>                                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679106808"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span>
</span><span id="line-161"></span><span>                                       </span><span class="annot"><span class="annottext">Int -&gt; Int
</span><a href="#local-6989586621679106808"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-162"></span><span>                      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int -&gt; Step Int Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106792"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106819"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span class="hs-special">)</span><span>
</span><span id="line-163"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679106818"><span class="annot"><span class="annottext">b :: Int
</span><a href="#local-6989586621679106818"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ord%23"><span class="hs-identifier hs-var">ord#</span></a></span><span> </span><span class="annot"><span class="annottext">Char#
</span><a href="#local-6989586621679106816"><span class="hs-identifier hs-var">b#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>            </span><span id="local-6989586621679106808"><span class="annot"><span class="annottext">next :: Int -&gt; Int
</span><a href="#local-6989586621679106808"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106788"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106788"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int
</span><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-var">I#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ord%23"><span class="hs-identifier hs-var">ord#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Char#
</span><a href="#local-6989586621679106787"><span class="hs-identifier hs-var">at#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106819"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106788"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0x80</span></span><span>
</span><span id="line-165"></span><span>            </span><span class="hs-glyph">!</span><span id="local-6989586621679106816"><span class="annot"><span class="annottext">b# :: Char#
</span><a href="#local-6989586621679106816"><span class="hs-identifier hs-var hs-var">b#</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char#
</span><a href="#local-6989586621679106787"><span class="hs-identifier hs-var">at#</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106819"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-166"></span><span>    </span><span id="local-6989586621679106787"><span class="annot"><span class="annottext">at# :: Int -&gt; Char#
</span><a href="#local-6989586621679106787"><span class="hs-identifier hs-var hs-var">at#</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679106786"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679106786"><span class="hs-identifier hs-var">i#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Int# -&gt; Char#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexCharOffAddr%23"><span class="hs-identifier hs-var">indexCharOffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679106839"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679106786"><span class="hs-identifier hs-var">i#</span></a></span><span>
</span><span id="line-167"></span><span>    </span><span id="local-6989586621679106809"><span class="annot"><span class="annottext">chr :: Int -&gt; Char
</span><a href="#local-6989586621679106809"><span class="hs-identifier hs-var hs-var">chr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679106785"><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679106785"><span class="hs-identifier hs-var">i#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char# -&gt; Char
</span><a href="../../ghc-prim/src/GHC.Types.html#C%23"><span class="hs-identifier hs-var">C#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Char#
</span><a href="../../ghc-prim/src/GHC.Prim.html#chr%23"><span class="hs-identifier hs-var">chr#</span></a></span><span> </span><span class="annot"><span class="annottext">Int#
</span><a href="#local-6989586621679106785"><span class="hs-identifier hs-var">i#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#streamCString%23"><span class="hs-pragma hs-type">streamCString#</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-171"></span><span class="hs-comment">-- * Basic stream functions</span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span class="hs-keyword">data</span><span> </span><span id="C"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#C"><span class="hs-identifier hs-var">C</span></a></span></span><span> </span><span id="local-6989586621679107069"><span class="annot"><a href="#local-6989586621679107069"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="C0"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#C0"><span class="hs-identifier hs-var">C0</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107069"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-174"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="C1"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#C1"><span class="hs-identifier hs-var">C1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107069"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span class="hs-comment">-- | /O(n)/ Adds a character to the front of a Stream Char.</span><span>
</span><span id="line-177"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#cons"><span class="hs-identifier hs-type">cons</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-178"></span><span id="cons"><span class="annot"><span class="annottext">cons :: Char -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#cons"><span class="hs-identifier hs-var hs-var">cons</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106782"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106782"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106780"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106780"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106779"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106779"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106778"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106778"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(C s -&gt; Step (C s) Char) -&gt; C s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">C s -&gt; Step (C s) Char
</span><a href="#local-6989586621679106777"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C1"><span class="hs-identifier hs-var">C1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106779"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106778"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-180"></span><span>      </span><span id="local-6989586621679106777"><span class="annot"><span class="annottext">next :: C s -&gt; Step (C s) Char
</span><a href="#local-6989586621679106777"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#C1"><span class="hs-identifier hs-type">C1</span></a></span><span> </span><span id="local-6989586621679106776"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106776"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; C s -&gt; Step (C s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106782"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C0"><span class="hs-identifier hs-var">C0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106776"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>      </span><span class="annot"><a href="#local-6989586621679106777"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#C0"><span class="hs-identifier hs-type">C0</span></a></span><span> </span><span id="local-6989586621679106775"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106775"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106780"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106775"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-182"></span><span>                          </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (C s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-183"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106774"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106774"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">C s -&gt; Step (C s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C0"><span class="hs-identifier hs-var">C0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106774"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-184"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106773"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106773"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106772"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106772"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; C s -&gt; Step (C s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106773"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C0"><span class="hs-identifier hs-var">C0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106772"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-185"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#cons"><span class="hs-pragma hs-type">cons</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span class="hs-keyword">data</span><span> </span><span id="Snoc"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Snoc"><span class="hs-identifier hs-var">Snoc</span></a></span></span><span> </span><span id="local-6989586621679107066"><span class="annot"><a href="#local-6989586621679107066"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="N"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#N"><span class="hs-identifier hs-var">N</span></a></span></span><span>
</span><span id="line-188"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span id="J"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#J"><span class="hs-identifier hs-var">J</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107066"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="hs-comment">-- | /O(n)/ Adds a character to the end of a stream.</span><span>
</span><span id="line-191"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#snoc"><span class="hs-identifier hs-type">snoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-192"></span><span id="snoc"><span class="annot"><span class="annottext">snoc :: Stream Char -&gt; Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#snoc"><span class="hs-identifier hs-var hs-var">snoc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106768"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106768"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106767"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106767"><span class="hs-identifier hs-var">xs0</span></a></span></span><span> </span><span id="local-6989586621679106766"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106766"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679106765"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106765"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Snoc s -&gt; Step (Snoc s) Char) -&gt; Snoc s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">Snoc s -&gt; Step (Snoc s) Char
</span><a href="#local-6989586621679106764"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Snoc s
forall a. a -&gt; Snoc a
</span><a href="Data.Text.Internal.Fusion.Common.html#J"><span class="hs-identifier hs-var">J</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106767"><span class="hs-identifier hs-var">xs0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106766"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-194"></span><span>    </span><span id="local-6989586621679106764"><span class="annot"><span class="annottext">next :: Snoc s -&gt; Step (Snoc s) Char
</span><a href="#local-6989586621679106764"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#J"><span class="hs-identifier hs-type">J</span></a></span><span> </span><span id="local-6989586621679106763"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106763"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106768"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106763"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-195"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Snoc s -&gt; Step (Snoc s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106765"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Snoc s
forall a. Snoc a
</span><a href="Data.Text.Internal.Fusion.Common.html#N"><span class="hs-identifier hs-var">N</span></a></span><span>
</span><span id="line-196"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106762"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106762"><span class="hs-identifier hs-var">xs'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Snoc s -&gt; Step (Snoc s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Snoc s
forall a. a -&gt; Snoc a
</span><a href="Data.Text.Internal.Fusion.Common.html#J"><span class="hs-identifier hs-var">J</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106762"><span class="hs-identifier hs-var">xs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106761"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106761"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106760"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106760"><span class="hs-identifier hs-var">xs'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Snoc s -&gt; Step (Snoc s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106761"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Snoc s
forall a. a -&gt; Snoc a
</span><a href="Data.Text.Internal.Fusion.Common.html#J"><span class="hs-identifier hs-var">J</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106760"><span class="hs-identifier hs-var">xs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-198"></span><span>    </span><span class="annot"><a href="#local-6989586621679106764"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">Snoc s
</span><a href="Data.Text.Internal.Fusion.Common.html#N"><span class="hs-identifier hs-var">N</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step (Snoc s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-199"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#snoc"><span class="hs-pragma hs-type">snoc</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-keyword">data</span><span> </span><span id="E"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#E"><span class="hs-identifier hs-var">E</span></a></span></span><span> </span><span id="local-6989586621679107062"><span class="annot"><a href="#local-6989586621679107062"><span class="hs-identifier hs-type">l</span></a></span></span><span> </span><span id="local-6989586621679107061"><span class="annot"><a href="#local-6989586621679107061"><span class="hs-identifier hs-type">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="L"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-var">L</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107062"><span class="hs-identifier hs-type">l</span></a></span><span>
</span><span id="line-202"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span id="R"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-var">R</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107061"><span class="hs-identifier hs-type">r</span></a></span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span class="hs-comment">-- | /O(n)/ Appends one Stream to the other.</span><span>
</span><span id="line-205"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#append"><span class="hs-identifier hs-type">append</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-206"></span><span id="append"><span class="annot"><span class="annottext">append :: Stream Char -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#append"><span class="hs-identifier hs-var hs-var">append</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106757"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106757"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106756"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106756"><span class="hs-identifier hs-var">s01</span></a></span></span><span> </span><span id="local-6989586621679106755"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106755"><span class="hs-identifier hs-var">len1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106753"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106753"><span class="hs-identifier hs-var">next1</span></a></span></span><span> </span><span id="local-6989586621679106752"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106752"><span class="hs-identifier hs-var">s02</span></a></span></span><span> </span><span id="local-6989586621679106751"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106751"><span class="hs-identifier hs-var">len2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-207"></span><span>    </span><span class="annot"><span class="annottext">(E s s -&gt; Step (E s s) Char) -&gt; E s s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">E s s -&gt; Step (E s s) Char
</span><a href="#local-6989586621679106750"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. l -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106756"><span class="hs-identifier hs-var">s01</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106755"><span class="hs-identifier hs-var">len1</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106751"><span class="hs-identifier hs-var">len2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-209"></span><span>      </span><span id="local-6989586621679106750"><span class="annot"><span class="annottext">next :: E s s -&gt; Step (E s s) Char
</span><a href="#local-6989586621679106750"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621679106749"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106749"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106757"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106749"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-210"></span><span>                         </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">E s s -&gt; Step (E s s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. r -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-var">R</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106752"><span class="hs-identifier hs-var">s02</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106748"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106748"><span class="hs-identifier hs-var">s1'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">E s s -&gt; Step (E s s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. l -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106748"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106747"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106747"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106746"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106746"><span class="hs-identifier hs-var">s1'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; E s s -&gt; Step (E s s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106747"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. l -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106746"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-213"></span><span>      </span><span class="annot"><a href="#local-6989586621679106750"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-type">R</span></a></span><span> </span><span id="local-6989586621679106745"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106745"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106753"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106745"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-214"></span><span>                          </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (E s s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-215"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106744"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106744"><span class="hs-identifier hs-var">s2'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">E s s -&gt; Step (E s s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. r -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-var">R</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106744"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106743"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106743"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106742"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106742"><span class="hs-identifier hs-var">s2'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; E s s -&gt; Step (E s s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106743"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. r -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-var">R</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106742"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-217"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#append"><span class="hs-pragma hs-type">append</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="hs-comment">-- | /O(1)/ Returns the first character of a Text, which must be non-empty.</span><span>
</span><span id="line-220"></span><span class="hs-comment">-- Subject to array fusion.</span><span>
</span><span id="line-221"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#head"><span class="hs-identifier hs-type">head</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-222"></span><span id="head"><span class="annot"><span class="annottext">head :: Stream Char -&gt; Char
</span><a href="Data.Text.Internal.Fusion.Common.html#head"><span class="hs-identifier hs-var hs-var">head</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106741"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106741"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106740"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106740"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106739"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106739"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106738"><span class="hs-identifier hs-var">loop_head</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106740"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-223"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-224"></span><span>      </span><span id="local-6989586621679106738"><span class="annot"><span class="annottext">loop_head :: s -&gt; Char
</span><a href="#local-6989586621679106738"><span class="hs-identifier hs-var hs-var">loop_head</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106737"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106737"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106741"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106737"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-225"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106736"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106736"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><span class="annottext">s
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106736"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-226"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106735"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106735"><span class="hs-identifier hs-var">s'</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106738"><span class="hs-identifier hs-var">loop_head</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106735"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-227"></span><span>                      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
forall a. a
</span><a href="Data.Text.Internal.Fusion.Common.html#head_empty"><span class="hs-identifier hs-var">head_empty</span></a></span><span>
</span><span id="line-228"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#head"><span class="hs-pragma hs-type">head</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span id="local-6989586621679107059"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#head_empty"><span class="hs-identifier hs-type">head_empty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679107059"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-231"></span><span id="head_empty"><span class="annot"><span class="annottext">head_empty :: forall a. a
</span><a href="Data.Text.Internal.Fusion.Common.html#head_empty"><span class="hs-identifier hs-var hs-var">head_empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; a
forall a. String -&gt; String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#streamError"><span class="hs-identifier hs-var">streamError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;head&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Empty stream&quot;</span></span><span>
</span><span id="line-232"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#head_empty"><span class="hs-pragma hs-type">head_empty</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="hs-comment">-- | /O(1)/ Returns the first character and remainder of a 'Stream</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- Char', or 'Nothing' if empty.  Subject to array fusion.</span><span>
</span><span id="line-236"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#uncons"><span class="hs-identifier hs-type">uncons</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-237"></span><span id="uncons"><span class="annot"><span class="annottext">uncons :: Stream Char -&gt; Maybe (Char, Stream Char)
</span><a href="Data.Text.Internal.Fusion.Common.html#uncons"><span class="hs-identifier hs-var hs-var">uncons</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106732"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106732"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106731"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106731"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106730"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106730"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Maybe (Char, Stream Char)
</span><a href="#local-6989586621679106729"><span class="hs-identifier hs-var">loop_uncons</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106731"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-238"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-239"></span><span>      </span><span id="local-6989586621679106729"><span class="annot"><span class="annottext">loop_uncons :: s -&gt; Maybe (Char, Stream Char)
</span><a href="#local-6989586621679106729"><span class="hs-identifier hs-var hs-var">loop_uncons</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106727"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106727"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106732"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106727"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-240"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106726"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106726"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106725"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106725"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Char, Stream Char) -&gt; Maybe (Char, Stream Char)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106726"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(s -&gt; Step s Char) -&gt; s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106732"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106725"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106730"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-241"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106724"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106724"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Maybe (Char, Stream Char)
</span><a href="#local-6989586621679106729"><span class="hs-identifier hs-var">loop_uncons</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106724"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-242"></span><span>                         </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Char, Stream Char)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-243"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#uncons"><span class="hs-pragma hs-type">uncons</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="hs-comment">-- | /O(n)/ Returns the last character of a 'Stream Char', which must</span><span>
</span><span id="line-246"></span><span class="hs-comment">-- be non-empty.</span><span>
</span><span id="line-247"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#last"><span class="hs-identifier hs-type">last</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-248"></span><span id="last"><span class="annot"><span class="annottext">last :: Stream Char -&gt; Char
</span><a href="Data.Text.Internal.Fusion.Common.html#last"><span class="hs-identifier hs-var hs-var">last</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106723"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106723"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106722"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106722"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106721"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106721"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106720"><span class="hs-identifier hs-var">loop0_last</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106722"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-249"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-250"></span><span>      </span><span id="local-6989586621679106720"><span class="annot"><span class="annottext">loop0_last :: s -&gt; Char
</span><a href="#local-6989586621679106720"><span class="hs-identifier hs-var hs-var">loop0_last</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106719"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106719"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106723"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106719"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-251"></span><span>                        </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;last&quot;</span></span><span>
</span><span id="line-252"></span><span>                        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106717"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106717"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106720"><span class="hs-identifier hs-var">loop0_last</span></a></span><span>  </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106717"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-253"></span><span>                        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106716"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106716"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106715"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106715"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106714"><span class="hs-identifier hs-var">loop_last</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106716"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106715"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-254"></span><span>      </span><span id="local-6989586621679106714"><span class="annot"><span class="annottext">loop_last :: Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106714"><span class="hs-identifier hs-var hs-var">loop_last</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106713"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106713"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106712"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106712"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106723"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106712"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-255"></span><span>                         </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106713"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-256"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106711"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106711"><span class="hs-identifier hs-var">s'</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106714"><span class="hs-identifier hs-var">loop_last</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106713"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106711"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-257"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106710"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106710"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679106709"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106709"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106714"><span class="hs-identifier hs-var">loop_last</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106710"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106709"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-258"></span><span class="hs-pragma">{-# INLINE</span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#last"><span class="hs-pragma hs-type">last</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span class="hs-comment">-- | /O(1)/ Returns all characters after the head of a Stream Char, which must</span><span>
</span><span id="line-261"></span><span class="hs-comment">-- be non-empty.</span><span>
</span><span id="line-262"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#tail"><span class="hs-identifier hs-type">tail</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-263"></span><span id="tail"><span class="annot"><span class="annottext">tail :: Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#tail"><span class="hs-identifier hs-var hs-var">tail</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106707"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106707"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106706"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106706"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106705"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106705"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(C s -&gt; Step (C s) Char) -&gt; C s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">C s -&gt; Step (C s) Char
</span><a href="#local-6989586621679106704"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C0"><span class="hs-identifier hs-var">C0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106706"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106705"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-265"></span><span>      </span><span id="local-6989586621679106704"><span class="annot"><span class="annottext">next :: C s -&gt; Step (C s) Char
</span><a href="#local-6989586621679106704"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#C0"><span class="hs-identifier hs-type">C0</span></a></span><span> </span><span id="local-6989586621679106703"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106703"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106707"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106703"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-266"></span><span>                      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Step (C s) Char
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;tail&quot;</span></span><span>
</span><span id="line-267"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106702"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106702"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">C s -&gt; Step (C s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C0"><span class="hs-identifier hs-var">C0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106702"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679106701"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106701"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">C s -&gt; Step (C s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C1"><span class="hs-identifier hs-var">C1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106701"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-269"></span><span>      </span><span class="annot"><a href="#local-6989586621679106704"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#C1"><span class="hs-identifier hs-type">C1</span></a></span><span> </span><span id="local-6989586621679106700"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106700"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106707"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106700"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-270"></span><span>                      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (C s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-271"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106699"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106699"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">C s -&gt; Step (C s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C1"><span class="hs-identifier hs-var">C1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106699"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-272"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106698"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106698"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106697"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106697"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; C s -&gt; Step (C s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106698"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; C s
forall s. s -&gt; C s
</span><a href="Data.Text.Internal.Fusion.Common.html#C1"><span class="hs-identifier hs-var">C1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106697"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-273"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#tail"><span class="hs-pragma hs-type">tail</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span class="hs-keyword">data</span><span> </span><span id="Init"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Init"><span class="hs-identifier hs-var">Init</span></a></span></span><span> </span><span id="local-6989586621679107050"><span class="annot"><a href="#local-6989586621679107050"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Init0"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Init0"><span class="hs-identifier hs-var">Init0</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107050"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-276"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span id="Init1"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Init1"><span class="hs-identifier hs-var">Init1</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107050"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span class="hs-comment">-- | /O(1)/ Returns all but the last character of a Stream Char, which</span><span>
</span><span id="line-279"></span><span class="hs-comment">-- must be non-empty.</span><span>
</span><span id="line-280"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#init"><span class="hs-identifier hs-type">init</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-281"></span><span id="init"><span class="annot"><span class="annottext">init :: Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#init"><span class="hs-identifier hs-var hs-var">init</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106693"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106693"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106692"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106692"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106691"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106691"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Init s -&gt; Step (Init s) Char) -&gt; Init s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">Init s -&gt; Step (Init s) Char
</span><a href="#local-6989586621679106690"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Init s
forall s. s -&gt; Init s
</span><a href="Data.Text.Internal.Fusion.Common.html#Init0"><span class="hs-identifier hs-var">Init0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106692"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106691"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-283"></span><span>      </span><span id="local-6989586621679106690"><span class="annot"><span class="annottext">next :: Init s -&gt; Step (Init s) Char
</span><a href="#local-6989586621679106690"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Init0"><span class="hs-identifier hs-type">Init0</span></a></span><span> </span><span id="local-6989586621679106689"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106689"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106693"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106689"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-284"></span><span>                         </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Step (Init s) Char
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;init&quot;</span></span><span>
</span><span id="line-285"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106688"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106688"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Init s -&gt; Step (Init s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Init s
forall s. s -&gt; Init s
</span><a href="Data.Text.Internal.Fusion.Common.html#Init0"><span class="hs-identifier hs-var">Init0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106688"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-286"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106687"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106687"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106686"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106686"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Init s -&gt; Step (Init s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Init s
forall s. Char -&gt; s -&gt; Init s
</span><a href="Data.Text.Internal.Fusion.Common.html#Init1"><span class="hs-identifier hs-var">Init1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106687"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106686"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span>      </span><span class="annot"><a href="#local-6989586621679106690"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Init1"><span class="hs-identifier hs-type">Init1</span></a></span><span> </span><span id="local-6989586621679106685"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106685"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106684"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106684"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106693"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106684"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-288"></span><span>                            </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (Init s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-289"></span><span>                            </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106683"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106683"><span class="hs-identifier hs-var">s'</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Init s -&gt; Step (Init s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Init s
forall s. Char -&gt; s -&gt; Init s
</span><a href="Data.Text.Internal.Fusion.Common.html#Init1"><span class="hs-identifier hs-var">Init1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106685"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106683"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-290"></span><span>                            </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106682"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106682"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679106681"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106681"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Init s -&gt; Step (Init s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106685"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Init s
forall s. Char -&gt; s -&gt; Init s
</span><a href="Data.Text.Internal.Fusion.Common.html#Init1"><span class="hs-identifier hs-var">Init1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106682"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106681"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-291"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#init"><span class="hs-pragma hs-type">init</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span class="hs-comment">-- | /O(1)/ Tests whether a Stream Char is empty or not.</span><span>
</span><span id="line-294"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#null"><span class="hs-identifier hs-type">null</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-295"></span><span id="null"><span class="annot"><span class="annottext">null :: Stream Char -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Common.html#null"><span class="hs-identifier hs-var hs-var">null</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106680"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106680"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106679"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106679"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106678"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106678"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106677"><span class="hs-identifier hs-var">loop_null</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106679"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-296"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-297"></span><span>      </span><span id="local-6989586621679106677"><span class="annot"><span class="annottext">loop_null :: s -&gt; Bool
</span><a href="#local-6989586621679106677"><span class="hs-identifier hs-var hs-var">loop_null</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106676"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106676"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106680"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106676"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-298"></span><span>                       </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-299"></span><span>                       </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">s
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-300"></span><span>                       </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106675"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106675"><span class="hs-identifier hs-var">s'</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106677"><span class="hs-identifier hs-var">loop_null</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106675"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-301"></span><span class="hs-pragma">{-# INLINE</span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#null"><span class="hs-pragma hs-type">null</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="hs-comment">-- | /O(n)/ Returns the number of characters in a string.</span><span>
</span><span id="line-304"></span><span id="local-6989586621679107048"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#lengthI"><span class="hs-identifier hs-type">lengthI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679107048"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107048"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-305"></span><span id="lengthI"><span class="annot"><span class="annottext">lengthI :: forall a. Integral a =&gt; Stream Char -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#lengthI"><span class="hs-identifier hs-var hs-var">lengthI</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106667"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106667"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106666"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106666"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106665"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106665"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; a
forall {a}. Num a =&gt; a -&gt; s -&gt; a
</span><a href="#local-6989586621679106664"><span class="hs-identifier hs-var">loop_length</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106666"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-306"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-307"></span><span>      </span><span id="local-6989586621679106664"><span class="annot"><span class="annottext">loop_length :: a -&gt; s -&gt; a
</span><a href="#local-6989586621679106664"><span class="hs-identifier hs-var hs-var">loop_length</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106660"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106660"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679106659"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106659"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106667"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106659"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-308"></span><span>                           </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106660"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-309"></span><span>                           </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106658"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106658"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; a
</span><a href="#local-6989586621679106664"><span class="hs-identifier hs-var">loop_length</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106660"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106658"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-310"></span><span>                           </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679106657"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106657"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; a
</span><a href="#local-6989586621679106664"><span class="hs-identifier hs-var">loop_length</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106660"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106657"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-311"></span><span class="hs-pragma">{-# INLINE</span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#lengthI"><span class="hs-pragma hs-type">lengthI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-312"></span><span>
</span><span id="line-313"></span><span class="hs-comment">-- | /O(n)/ Compares the count of characters in a string to a number.</span><span>
</span><span id="line-314"></span><span class="hs-comment">-- Subject to fusion.</span><span>
</span><span id="line-315"></span><span class="hs-comment">--</span><span>
</span><span id="line-316"></span><span class="hs-comment">-- This function gives the same answer as comparing against the result</span><span>
</span><span id="line-317"></span><span class="hs-comment">-- of 'lengthI', but can short circuit if the count of characters is</span><span>
</span><span id="line-318"></span><span class="hs-comment">-- greater than the number or if the stream can't possibly be as long</span><span>
</span><span id="line-319"></span><span class="hs-comment">-- as the number supplied, and hence be more efficient.</span><span>
</span><span id="line-320"></span><span id="local-6989586621679107042"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#compareLengthI"><span class="hs-identifier hs-type">compareLengthI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679107042"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107042"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span></span><span>
</span><span id="line-321"></span><span id="compareLengthI"><span class="annot"><span class="annottext">compareLengthI :: forall a. Integral a =&gt; Stream Char -&gt; a -&gt; Ordering
</span><a href="Data.Text.Internal.Fusion.Common.html#compareLengthI"><span class="hs-identifier hs-var hs-var">compareLengthI</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106648"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106648"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106647"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106647"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106646"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106646"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679106645"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106645"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-322"></span><span>    </span><span class="hs-comment">-- Note that @len@ tracks code units whereas we want to compare the length</span><span>
</span><span id="line-323"></span><span>    </span><span class="hs-comment">-- in code points. Specifically, a stream with hint @len@ may consist of</span><span>
</span><span id="line-324"></span><span>    </span><span class="hs-comment">-- anywhere from @len/2@ to @len@ code points.</span><span>
</span><span id="line-325"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106645"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-326"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679106643"><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679106643"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Maybe Ordering
</span><a href="Data.Text.Internal.Fusion.Size.html#compareSize"><span class="hs-identifier hs-var">compareSize</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106646"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106641"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679106643"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-327"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; Ordering
</span><a href="#local-6989586621679106640"><span class="hs-identifier hs-var">loop_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106647"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-328"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-329"></span><span>      </span><span id="local-6989586621679106641"><span class="annot"><span class="annottext">n' :: Size
</span><a href="#local-6989586621679106641"><span class="hs-identifier hs-var hs-var">n'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Size) -&gt; Int -&gt; Size
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106645"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-330"></span><span>      </span><span id="local-6989586621679106640"><span class="annot"><span class="annottext">loop_cmp :: a -&gt; s -&gt; Ordering
</span><a href="#local-6989586621679106640"><span class="hs-identifier hs-var hs-var">loop_cmp</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106633"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106633"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679106632"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106632"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106648"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106632"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-331"></span><span>                         </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106633"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106645"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-332"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106630"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106630"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; Ordering
</span><a href="#local-6989586621679106640"><span class="hs-identifier hs-var">loop_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106633"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106630"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-333"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679106629"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106629"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106633"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106645"><span class="hs-identifier hs-var">n</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-334"></span><span>                                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; Ordering
</span><a href="#local-6989586621679106640"><span class="hs-identifier hs-var">loop_cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106633"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106629"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-335"></span><span class="hs-pragma">{-# INLINE</span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#compareLengthI"><span class="hs-pragma hs-type">compareLengthI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-336"></span><span>
</span><span id="line-337"></span><span class="hs-comment">-- | /O(n)/ Indicate whether a string contains exactly one element.</span><span>
</span><span id="line-338"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#isSingleton"><span class="hs-identifier hs-type">isSingleton</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-339"></span><span id="isSingleton"><span class="annot"><span class="annottext">isSingleton :: Stream Char -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Common.html#isSingleton"><span class="hs-identifier hs-var hs-var">isSingleton</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106627"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106627"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106626"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106626"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106625"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106625"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; s -&gt; Bool
</span><a href="#local-6989586621679106624"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106626"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-340"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-341"></span><span>      </span><span id="local-6989586621679106624"><span class="annot"><span class="annottext">loop :: Int -&gt; s -&gt; Bool
</span><a href="#local-6989586621679106624"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106618"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106618"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679106617"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106617"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106627"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106617"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-342"></span><span>                     </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106618"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-glyph">::</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-343"></span><span>                     </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106616"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106616"><span class="hs-identifier hs-var">s'</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; s -&gt; Bool
</span><a href="#local-6989586621679106624"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106618"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106616"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-344"></span><span>                     </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679106615"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106615"><span class="hs-identifier hs-var">s'</span></a></span></span><span>
</span><span id="line-345"></span><span>                         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106618"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-346"></span><span>                         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; s -&gt; Bool
</span><a href="#local-6989586621679106624"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679106618"><span class="hs-identifier hs-var">z</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106615"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-347"></span><span class="hs-pragma">{-# INLINE</span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#isSingleton"><span class="hs-pragma hs-type">isSingleton</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-350"></span><span class="hs-comment">-- * Stream transformations</span><span>
</span><span id="line-351"></span><span>
</span><span id="line-352"></span><span class="hs-comment">-- | /O(n)/ 'map' @f @xs is the Stream Char obtained by applying @f@</span><span>
</span><span id="line-353"></span><span class="hs-comment">-- to each element of @xs@.</span><span>
</span><span id="line-354"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#map"><span class="hs-identifier hs-type">map</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-355"></span><span id="map"><span class="annot"><span class="annottext">map :: (Char -&gt; Char) -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#map"><span class="hs-identifier hs-var hs-var">map</span></a></span></span><span> </span><span id="local-6989586621679106614"><span class="annot"><span class="annottext">Char -&gt; Char
</span><a href="#local-6989586621679106614"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106613"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106613"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106612"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106612"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106611"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106611"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(s -&gt; Step s Char) -&gt; s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106610"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106612"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106611"><span class="hs-identifier hs-var">len</span></a></span><span>
</span><span id="line-356"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-357"></span><span>      </span><span id="local-6989586621679106610"><span class="annot"><span class="annottext">next :: s -&gt; Step s Char
</span><a href="#local-6989586621679106610"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106609"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106609"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106613"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106609"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-358"></span><span>                  </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step s Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-359"></span><span>                  </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106608"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106608"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106608"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-360"></span><span>                  </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106607"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106607"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106606"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106606"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Step s Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char
</span><a href="#local-6989586621679106614"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106607"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106606"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-361"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#map"><span class="hs-pragma hs-type">map</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-362"></span><span>
</span><span id="line-363"></span><span class="hs-pragma">{-#
  RULES</span><span> </span><span class="annot"><span class="hs-pragma">&quot;STREAM map/map fusion&quot;</span></span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679106605"><span class="annot"><a href="#local-6989586621679106605"><span class="hs-pragma hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679106604"><span class="annot"><a href="#local-6989586621679106604"><span class="hs-pragma hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679106603"><span class="annot"><a href="#local-6989586621679106603"><span class="hs-pragma hs-var">s</span></a></span></span><span class="hs-pragma">.</span><span>
</span><span id="line-365"></span><span>     </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#map"><span class="hs-pragma hs-type">map</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106605"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#map"><span class="hs-pragma hs-type">map</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106604"><span class="hs-pragma hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106603"><span class="hs-pragma hs-type">s</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#map"><span class="hs-pragma hs-type">map</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span id="local-6989586621679106602"><span class="annot"><a href="#local-6989586621679106602"><span class="hs-pragma hs-var">x</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106605"><span class="hs-pragma hs-type">f</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="#local-6989586621679106604"><span class="hs-pragma hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106602"><span class="hs-pragma hs-type">x</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679106603"><span class="hs-pragma hs-type">s</span></a></span><span>
</span><span id="line-366"></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-367"></span><span>
</span><span id="line-368"></span><span class="hs-keyword">data</span><span> </span><span id="I"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#I"><span class="hs-identifier hs-var">I</span></a></span></span><span> </span><span id="local-6989586621679107033"><span class="annot"><a href="#local-6989586621679107033"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="I1"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#I1"><span class="hs-identifier hs-var">I1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107033"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-369"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="I2"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#I2"><span class="hs-identifier hs-var">I2</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107033"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-370"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span id="I3"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#I3"><span class="hs-identifier hs-var">I3</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107033"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span class="hs-comment">-- | /O(n)/ Take a character and place it between each of the</span><span>
</span><span id="line-373"></span><span class="hs-comment">-- characters of a 'Stream Char'.</span><span>
</span><span id="line-374"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#intersperse"><span class="hs-identifier hs-type">intersperse</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-375"></span><span id="intersperse"><span class="annot"><span class="annottext">intersperse :: Char -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#intersperse"><span class="hs-identifier hs-var hs-var">intersperse</span></a></span></span><span> </span><span id="local-6989586621679106598"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106598"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106596"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106596"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106595"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106595"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106594"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106594"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(I s -&gt; Step (I s) Char) -&gt; I s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">I s -&gt; Step (I s) Char
</span><a href="#local-6989586621679106593"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; I s
forall s. s -&gt; I s
</span><a href="Data.Text.Internal.Fusion.Common.html#I1"><span class="hs-identifier hs-var">I1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106595"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106594"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-376"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-377"></span><span>      </span><span id="local-6989586621679106593"><span class="annot"><span class="annottext">next :: I s -&gt; Step (I s) Char
</span><a href="#local-6989586621679106593"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#I1"><span class="hs-identifier hs-type">I1</span></a></span><span> </span><span id="local-6989586621679106592"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106592"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106596"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106592"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-378"></span><span>        </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (I s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-379"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106591"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106591"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">I s -&gt; Step (I s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; I s
forall s. s -&gt; I s
</span><a href="Data.Text.Internal.Fusion.Common.html#I1"><span class="hs-identifier hs-var">I1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106591"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-380"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106590"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106590"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106589"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106589"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">I s -&gt; Step (I s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Char -&gt; I s
forall s. s -&gt; Char -&gt; I s
</span><a href="Data.Text.Internal.Fusion.Common.html#I2"><span class="hs-identifier hs-var">I2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106589"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106590"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-381"></span><span>      </span><span class="annot"><a href="#local-6989586621679106593"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#I2"><span class="hs-identifier hs-type">I2</span></a></span><span> </span><span id="local-6989586621679106588"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106588"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679106587"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106587"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; I s -&gt; Step (I s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106587"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; I s
forall s. s -&gt; I s
</span><a href="Data.Text.Internal.Fusion.Common.html#I3"><span class="hs-identifier hs-var">I3</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106588"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-382"></span><span>      </span><span class="annot"><a href="#local-6989586621679106593"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#I3"><span class="hs-identifier hs-type">I3</span></a></span><span> </span><span id="local-6989586621679106586"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106586"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106596"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106586"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-383"></span><span>        </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (I s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-384"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106585"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106585"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">I s -&gt; Step (I s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; I s
forall s. s -&gt; I s
</span><a href="Data.Text.Internal.Fusion.Common.html#I3"><span class="hs-identifier hs-var">I3</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106585"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-385"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106584"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106584"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106583"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106583"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; I s -&gt; Step (I s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106598"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Char -&gt; I s
forall s. s -&gt; Char -&gt; I s
</span><a href="Data.Text.Internal.Fusion.Common.html#I2"><span class="hs-identifier hs-var">I2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106583"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106584"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-386"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#intersperse"><span class="hs-pragma hs-type">intersperse</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-389"></span><span class="hs-comment">-- ** Case conversions (folds)</span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span class="hs-comment">-- $case</span><span>
</span><span id="line-392"></span><span class="hs-comment">--</span><span>
</span><span id="line-393"></span><span class="hs-comment">-- With Unicode text, it is incorrect to use combinators like @map</span><span>
</span><span id="line-394"></span><span class="hs-comment">-- toUpper@ to case convert each character of a string individually.</span><span>
</span><span id="line-395"></span><span class="hs-comment">-- Instead, use the whole-string case conversion functions from this</span><span>
</span><span id="line-396"></span><span class="hs-comment">-- module.  For correctness in different writing systems, these</span><span>
</span><span id="line-397"></span><span class="hs-comment">-- functions may map one input character to two or three output</span><span>
</span><span id="line-398"></span><span class="hs-comment">-- characters.</span><span>
</span><span id="line-399"></span><span>
</span><span id="line-400"></span><span class="hs-comment">-- | Map a 'Stream' through the given case-mapping function.</span><span>
</span><span id="line-401"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#caseConvert"><span class="hs-identifier hs-type">caseConvert</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679107032"><span class="annot"><a href="#local-6989586621679107032"><span class="hs-identifier hs-type">s</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107032"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Step"><span class="hs-identifier hs-type">Step</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-type">CC</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679107032"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-402"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-403"></span><span id="caseConvert"><span class="annot"><span class="annottext">caseConvert :: (forall s. Char -&gt; s -&gt; Step (CC s) Char)
-&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#caseConvert"><span class="hs-identifier hs-var hs-var">caseConvert</span></a></span></span><span> </span><span id="local-6989586621679106581"><span class="annot"><span class="annottext">forall s. Char -&gt; s -&gt; Step (CC s) Char
</span><a href="#local-6989586621679106581"><span class="hs-identifier hs-var">remap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106578"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106578"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106577"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106577"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106576"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106576"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-404"></span><span>    </span><span class="annot"><span class="annottext">(CC s -&gt; Step (CC s) Char) -&gt; CC s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">CC s -&gt; Step (CC s) Char
</span><a href="#local-6989586621679106575"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Char -&gt; Char -&gt; CC s
forall s. s -&gt; Char -&gt; Char -&gt; CC s
</span><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106577"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106576"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unionSize"><span class="hs-operator hs-var">`unionSize`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><span class="hs-number">3</span></span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106576"><span class="hs-identifier hs-var">len</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-405"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-406"></span><span>    </span><span id="local-6989586621679106575"><span class="annot"><span class="annottext">next :: CC s -&gt; Step (CC s) Char
</span><a href="#local-6989586621679106575"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-type">CC</span></a></span><span> </span><span id="local-6989586621679106572"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106572"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-407"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106578"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106572"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-408"></span><span>          </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (CC s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-409"></span><span>          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106571"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106571"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CC s -&gt; Step (CC s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Char -&gt; Char -&gt; CC s
forall s. s -&gt; Char -&gt; Char -&gt; CC s
</span><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106571"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span class="hs-special">)</span><span>
</span><span id="line-410"></span><span>          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106570"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106570"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679106569"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106569"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Step (CC s) Char
forall s. Char -&gt; s -&gt; Step (CC s) Char
</span><a href="#local-6989586621679106581"><span class="hs-identifier hs-var">remap</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106570"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106569"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-411"></span><span>    </span><span class="annot"><a href="#local-6989586621679106575"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-type">CC</span></a></span><span> </span><span id="local-6989586621679106568"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106568"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679106567"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106567"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679106566"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106566"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Char -&gt; CC s -&gt; Step (CC s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106567"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Char -&gt; Char -&gt; CC s
forall s. s -&gt; Char -&gt; Char -&gt; CC s
</span><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106568"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106566"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span class="hs-special">)</span><span>
</span><span id="line-412"></span><span>
</span><span id="line-413"></span><span class="hs-comment">-- | /O(n)/ Convert a string to folded case.  This function is mainly</span><span>
</span><span id="line-414"></span><span class="hs-comment">-- useful for performing caseless (or case insensitive) string</span><span>
</span><span id="line-415"></span><span class="hs-comment">-- comparisons.</span><span>
</span><span id="line-416"></span><span class="hs-comment">--</span><span>
</span><span id="line-417"></span><span class="hs-comment">-- A string @x@ is a caseless match for a string @y@ if and only if:</span><span>
</span><span id="line-418"></span><span class="hs-comment">--</span><span>
</span><span id="line-419"></span><span class="hs-comment">-- @toCaseFold x == toCaseFold y@</span><span>
</span><span id="line-420"></span><span class="hs-comment">--</span><span>
</span><span id="line-421"></span><span class="hs-comment">-- The result string may be longer than the input string, and may</span><span>
</span><span id="line-422"></span><span class="hs-comment">-- differ from applying 'toLower' to the input string.  For instance,</span><span>
</span><span id="line-423"></span><span class="hs-comment">-- the Armenian small ligature men now (U+FB13) is case folded to the</span><span>
</span><span id="line-424"></span><span class="hs-comment">-- bigram men now (U+0574 U+0576), while the micro sign (U+00B5) is</span><span>
</span><span id="line-425"></span><span class="hs-comment">-- case folded to the Greek small letter letter mu (U+03BC) instead of</span><span>
</span><span id="line-426"></span><span class="hs-comment">-- itself.</span><span>
</span><span id="line-427"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toCaseFold"><span class="hs-identifier hs-type">toCaseFold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-428"></span><span id="toCaseFold"><span class="annot"><span class="annottext">toCaseFold :: Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#toCaseFold"><span class="hs-identifier hs-var hs-var">toCaseFold</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall s. Char -&gt; s -&gt; Step (CC s) Char)
-&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#caseConvert"><span class="hs-identifier hs-var">caseConvert</span></a></span><span> </span><span class="annot"><span class="annottext">forall s. Char -&gt; s -&gt; Step (CC s) Char
</span><a href="Data.Text.Internal.Fusion.CaseMapping.html#foldMapping"><span class="hs-identifier hs-var">foldMapping</span></a></span><span>
</span><span id="line-429"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toCaseFold"><span class="hs-pragma hs-type">toCaseFold</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span class="hs-comment">-- | /O(n)/ Convert a string to upper case, using simple case</span><span>
</span><span id="line-432"></span><span class="hs-comment">-- conversion.  The result string may be longer than the input string.</span><span>
</span><span id="line-433"></span><span class="hs-comment">-- For instance, the German eszett (U+00DF) maps to the two-letter</span><span>
</span><span id="line-434"></span><span class="hs-comment">-- sequence SS.</span><span>
</span><span id="line-435"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toUpper"><span class="hs-identifier hs-type">toUpper</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-436"></span><span id="toUpper"><span class="annot"><span class="annottext">toUpper :: Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#toUpper"><span class="hs-identifier hs-var hs-var">toUpper</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall s. Char -&gt; s -&gt; Step (CC s) Char)
-&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#caseConvert"><span class="hs-identifier hs-var">caseConvert</span></a></span><span> </span><span class="annot"><span class="annottext">forall s. Char -&gt; s -&gt; Step (CC s) Char
</span><a href="Data.Text.Internal.Fusion.CaseMapping.html#upperMapping"><span class="hs-identifier hs-var">upperMapping</span></a></span><span>
</span><span id="line-437"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toUpper"><span class="hs-pragma hs-type">toUpper</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-438"></span><span>
</span><span id="line-439"></span><span class="hs-comment">-- | /O(n)/ Convert a string to lower case, using simple case</span><span>
</span><span id="line-440"></span><span class="hs-comment">-- conversion.  The result string may be longer than the input string.</span><span>
</span><span id="line-441"></span><span class="hs-comment">-- For instance, the Latin capital letter I with dot above (U+0130)</span><span>
</span><span id="line-442"></span><span class="hs-comment">-- maps to the sequence Latin small letter i (U+0069) followed by</span><span>
</span><span id="line-443"></span><span class="hs-comment">-- combining dot above (U+0307).</span><span>
</span><span id="line-444"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toLower"><span class="hs-identifier hs-type">toLower</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-445"></span><span id="toLower"><span class="annot"><span class="annottext">toLower :: Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#toLower"><span class="hs-identifier hs-var hs-var">toLower</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall s. Char -&gt; s -&gt; Step (CC s) Char)
-&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#caseConvert"><span class="hs-identifier hs-var">caseConvert</span></a></span><span> </span><span class="annot"><span class="annottext">forall s. Char -&gt; s -&gt; Step (CC s) Char
</span><a href="Data.Text.Internal.Fusion.CaseMapping.html#lowerMapping"><span class="hs-identifier hs-var">lowerMapping</span></a></span><span>
</span><span id="line-446"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toLower"><span class="hs-pragma hs-type">toLower</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-447"></span><span>
</span><span id="line-448"></span><span class="hs-comment">-- | /O(n)/ Convert a string to title case, using simple case</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- conversion.</span><span>
</span><span id="line-450"></span><span class="hs-comment">--</span><span>
</span><span id="line-451"></span><span class="hs-comment">-- The first letter of the input is converted to title case, as is</span><span>
</span><span id="line-452"></span><span class="hs-comment">-- every subsequent letter that immediately follows a non-letter.</span><span>
</span><span id="line-453"></span><span class="hs-comment">-- Every letter that immediately follows another letter is converted</span><span>
</span><span id="line-454"></span><span class="hs-comment">-- to lower case.</span><span>
</span><span id="line-455"></span><span class="hs-comment">--</span><span>
</span><span id="line-456"></span><span class="hs-comment">-- The result string may be longer than the input string. For example,</span><span>
</span><span id="line-457"></span><span class="hs-comment">-- the Latin small ligature &amp;#xfb02; (U+FB02) is converted to the</span><span>
</span><span id="line-458"></span><span class="hs-comment">-- sequence Latin capital letter F (U+0046) followed by Latin small</span><span>
</span><span id="line-459"></span><span class="hs-comment">-- letter l (U+006C).</span><span>
</span><span id="line-460"></span><span class="hs-comment">--</span><span>
</span><span id="line-461"></span><span class="hs-comment">-- /Note/: this function does not take language or culture specific</span><span>
</span><span id="line-462"></span><span class="hs-comment">-- rules into account. For instance, in English, different style</span><span>
</span><span id="line-463"></span><span class="hs-comment">-- guides disagree on whether the book name \&quot;The Hill of the Red</span><span>
</span><span id="line-464"></span><span class="hs-comment">-- Fox\&quot; is correctly title cased&amp;#x2014;but this function will</span><span>
</span><span id="line-465"></span><span class="hs-comment">-- capitalize /every/ word.</span><span>
</span><span id="line-466"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toTitle"><span class="hs-identifier hs-type">toTitle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-467"></span><span id="toTitle"><span class="annot"><span class="annottext">toTitle :: Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#toTitle"><span class="hs-identifier hs-var hs-var">toTitle</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106564"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106564"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106563"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106563"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106562"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106562"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CC (PairS Bool s) -&gt; Step (CC (PairS Bool s)) Char)
-&gt; CC (PairS Bool s) -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">CC (PairS Bool s) -&gt; Step (CC (PairS Bool s)) Char
</span><a href="#local-6989586621679106561"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PairS Bool s -&gt; Char -&gt; Char -&gt; CC (PairS Bool s)
forall s. s -&gt; Char -&gt; Char -&gt; CC s
</span><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; s -&gt; PairS Bool s
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106563"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106562"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-468"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-469"></span><span>    </span><span id="local-6989586621679106561"><span class="annot"><span class="annottext">next :: CC (PairS Bool s) -&gt; Step (CC (PairS Bool s)) Char
</span><a href="#local-6989586621679106561"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-type">CC</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679106559"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679106559"><span class="hs-identifier hs-var">letter</span></a></span></span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span id="local-6989586621679106558"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106558"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-470"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106564"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106558"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-471"></span><span>        </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (CC (PairS Bool s)) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-472"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106557"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106557"><span class="hs-identifier hs-var">s'</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CC (PairS Bool s) -&gt; Step (CC (PairS Bool s)) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PairS Bool s -&gt; Char -&gt; Char -&gt; CC (PairS Bool s)
forall s. s -&gt; Char -&gt; Char -&gt; CC s
</span><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679106559"><span class="hs-identifier hs-var">letter</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; s -&gt; PairS Bool s
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106557"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span class="hs-special">)</span><span>
</span><span id="line-473"></span><span>        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106556"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106556"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679106555"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106555"><span class="hs-identifier hs-var">s'</span></a></span></span><span>
</span><span id="line-474"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679106554"><span class="hs-identifier hs-var">nonSpace</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679106559"><span class="hs-identifier hs-var">letter</span></a></span><span>
</span><span id="line-475"></span><span>                           </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Char -&gt; PairS Bool s -&gt; Step (CC (PairS Bool s)) Char
forall s. Char -&gt; s -&gt; Step (CC s) Char
</span><a href="Data.Text.Internal.Fusion.CaseMapping.html#lowerMapping"><span class="hs-identifier hs-var">lowerMapping</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106556"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679106554"><span class="hs-identifier hs-var">nonSpace</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; s -&gt; PairS Bool s
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106555"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>                           </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char -&gt; PairS Bool s -&gt; Step (CC (PairS Bool s)) Char
forall s. Char -&gt; s -&gt; Step (CC s) Char
</span><a href="Data.Text.Internal.Fusion.CaseMapping.html#titleMapping"><span class="hs-identifier hs-var">titleMapping</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106556"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679106553"><span class="hs-identifier hs-var">letter'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; s -&gt; PairS Bool s
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106555"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-477"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; CC (PairS Bool s) -&gt; Step (CC (PairS Bool s)) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106556"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PairS Bool s -&gt; Char -&gt; Char -&gt; CC (PairS Bool s)
forall s. s -&gt; Char -&gt; Char -&gt; CC s
</span><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679106553"><span class="hs-identifier hs-var">letter'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; s -&gt; PairS Bool s
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106555"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span class="hs-special">)</span><span>
</span><span id="line-478"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679106554"><span class="annot"><span class="annottext">nonSpace :: Bool
</span><a href="#local-6989586621679106554"><span class="hs-identifier hs-var hs-var">nonSpace</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">P.not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106556"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-479"></span><span>                </span><span id="local-6989586621679106553"><span class="annot"><span class="annottext">letter' :: Bool
</span><a href="#local-6989586621679106553"><span class="hs-identifier hs-var hs-var">letter'</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/Data.Char.html#isLetter"><span class="hs-identifier hs-var">isLetter</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106556"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-480"></span><span>    </span><span class="annot"><a href="#local-6989586621679106561"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-type">CC</span></a></span><span> </span><span id="local-6989586621679106551"><span class="annot"><span class="annottext">PairS Bool s
</span><a href="#local-6989586621679106551"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679106550"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106550"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679106549"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106549"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; CC (PairS Bool s) -&gt; Step (CC (PairS Bool s)) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106550"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PairS Bool s -&gt; Char -&gt; Char -&gt; CC (PairS Bool s)
forall s. s -&gt; Char -&gt; Char -&gt; CC s
</span><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span><span> </span><span class="annot"><span class="annottext">PairS Bool s
</span><a href="#local-6989586621679106551"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106549"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\0'</span></span><span class="hs-special">)</span><span>
</span><span id="line-481"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#toTitle"><span class="hs-pragma hs-type">toTitle</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-482"></span><span>
</span><span id="line-483"></span><span class="hs-keyword">data</span><span> </span><span id="Justify"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Justify"><span class="hs-identifier hs-var">Justify</span></a></span></span><span> </span><span id="local-6989586621679107020"><span class="annot"><a href="#local-6989586621679107020"><span class="hs-identifier hs-type">i</span></a></span></span><span> </span><span id="local-6989586621679107019"><span class="annot"><a href="#local-6989586621679107019"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Just1"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Just1"><span class="hs-identifier hs-var">Just1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107020"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107019"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-484"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="Just2"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Just2"><span class="hs-identifier hs-var">Just2</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107020"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679107019"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-485"></span><span>
</span><span id="line-486"></span><span id="local-6989586621679107024"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#justifyLeftI"><span class="hs-identifier hs-type">justifyLeftI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679107024"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107024"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span></span><span>
</span><span id="line-487"></span><span id="justifyLeftI"><span class="annot"><span class="annottext">justifyLeftI :: forall a. Integral a =&gt; a -&gt; Char -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#justifyLeftI"><span class="hs-identifier hs-var hs-var">justifyLeftI</span></a></span></span><span> </span><span id="local-6989586621679106542"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106542"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621679106541"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106541"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106535"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106535"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106534"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106534"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106533"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106533"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-488"></span><span>    </span><span class="annot"><span class="annottext">(Justify a s -&gt; Step (Justify a s) Char)
-&gt; Justify a s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">Justify a s -&gt; Step (Justify a s) Char
</span><a href="#local-6989586621679106532"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; s -&gt; Justify a s
forall i s. i -&gt; s -&gt; Justify i s
</span><a href="Data.Text.Internal.Fusion.Common.html#Just1"><span class="hs-identifier hs-var">Just1</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106534"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#larger"><span class="hs-identifier hs-var">larger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Size
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106542"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#charSize"><span class="hs-identifier hs-var">charSize</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106541"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106533"><span class="hs-identifier hs-var">len</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106533"><span class="hs-identifier hs-var">len</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-489"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-490"></span><span>    </span><span id="local-6989586621679106532"><span class="annot"><span class="annottext">next :: Justify a s -&gt; Step (Justify a s) Char
</span><a href="#local-6989586621679106532"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Just1"><span class="hs-identifier hs-type">Just1</span></a></span><span> </span><span id="local-6989586621679106524"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106524"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679106523"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106523"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-491"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106535"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106523"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-492"></span><span>          </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Justify a s -&gt; Step (Justify a s) Char
</span><a href="#local-6989586621679106532"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; s -&gt; Justify a s
forall i s. i -&gt; s -&gt; Justify i s
</span><a href="Data.Text.Internal.Fusion.Common.html#Just2"><span class="hs-identifier hs-var">Just2</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106524"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106523"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-493"></span><span>          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106522"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106522"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Justify a s -&gt; Step (Justify a s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; s -&gt; Justify a s
forall i s. i -&gt; s -&gt; Justify i s
</span><a href="Data.Text.Internal.Fusion.Common.html#Just1"><span class="hs-identifier hs-var">Just1</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106524"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106522"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-494"></span><span>          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106521"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106521"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106520"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106520"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Justify a s -&gt; Step (Justify a s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106521"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; s -&gt; Justify a s
forall i s. i -&gt; s -&gt; Justify i s
</span><a href="Data.Text.Internal.Fusion.Common.html#Just1"><span class="hs-identifier hs-var">Just1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106524"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106520"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-495"></span><span>    </span><span class="annot"><a href="#local-6989586621679106532"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Just2"><span class="hs-identifier hs-type">Just2</span></a></span><span> </span><span id="local-6989586621679106519"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106519"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679106518"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106518"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-496"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106519"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106542"><span class="hs-identifier hs-var">k</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Justify a s -&gt; Step (Justify a s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106541"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; s -&gt; Justify a s
forall i s. i -&gt; s -&gt; Justify i s
</span><a href="Data.Text.Internal.Fusion.Common.html#Just2"><span class="hs-identifier hs-var">Just2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106519"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106518"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-497"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step (Justify a s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-498"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679106532"><span class="hs-pragma hs-type">next</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-499"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#justifyLeftI"><span class="hs-pragma hs-type">justifyLeftI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-500"></span><span>
</span><span id="line-501"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-502"></span><span class="hs-comment">-- * Reducing Streams (folds)</span><span>
</span><span id="line-503"></span><span>
</span><span id="line-504"></span><span class="hs-comment">-- | foldl, applied to a binary operator, a starting value (typically the</span><span>
</span><span id="line-505"></span><span class="hs-comment">-- left-identity of the operator), and a Stream, reduces the Stream using the</span><span>
</span><span id="line-506"></span><span class="hs-comment">-- binary operator, from left to right.</span><span>
</span><span id="line-507"></span><span id="local-6989586621679107018"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl"><span class="hs-identifier hs-type">foldl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679107018"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107018"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107018"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107018"><span class="hs-identifier hs-type">b</span></a></span></span><span>
</span><span id="line-508"></span><span id="foldl"><span class="annot"><span class="annottext">foldl :: forall b. (b -&gt; Char -&gt; b) -&gt; b -&gt; Stream Char -&gt; b
</span><a href="Data.Text.Internal.Fusion.Common.html#foldl"><span class="hs-identifier hs-var hs-var">foldl</span></a></span></span><span> </span><span id="local-6989586621679106517"><span class="annot"><span class="annottext">b -&gt; Char -&gt; b
</span><a href="#local-6989586621679106517"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679106516"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106516"><span class="hs-identifier hs-var">z0</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106515"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106515"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106514"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106514"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106513"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106513"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; s -&gt; b
</span><a href="#local-6989586621679106512"><span class="hs-identifier hs-var">loop_foldl</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106516"><span class="hs-identifier hs-var">z0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106514"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-509"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-510"></span><span>      </span><span id="local-6989586621679106512"><span class="annot"><span class="annottext">loop_foldl :: b -&gt; s -&gt; b
</span><a href="#local-6989586621679106512"><span class="hs-identifier hs-var hs-var">loop_foldl</span></a></span></span><span> </span><span id="local-6989586621679106511"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106511"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106510"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106510"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106515"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106510"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-511"></span><span>                          </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106511"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-512"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106509"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106509"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; s -&gt; b
</span><a href="#local-6989586621679106512"><span class="hs-identifier hs-var">loop_foldl</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106511"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106509"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-513"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106508"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106508"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106507"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106507"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; s -&gt; b
</span><a href="#local-6989586621679106512"><span class="hs-identifier hs-var">loop_foldl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b -&gt; Char -&gt; b
</span><a href="#local-6989586621679106517"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106511"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106508"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106507"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-514"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl"><span class="hs-pragma hs-type">foldl</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-515"></span><span>
</span><span id="line-516"></span><span class="hs-comment">-- | A strict version of foldl.</span><span>
</span><span id="line-517"></span><span id="local-6989586621679106506"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl%27"><span class="hs-identifier hs-type">foldl'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679106506"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106506"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106506"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106506"><span class="hs-identifier hs-type">b</span></a></span></span><span>
</span><span id="line-518"></span><span id="foldl%27"><span class="annot"><span class="annottext">foldl' :: forall b. (b -&gt; Char -&gt; b) -&gt; b -&gt; Stream Char -&gt; b
</span><a href="Data.Text.Internal.Fusion.Common.html#foldl%27"><span class="hs-identifier hs-var hs-var">foldl'</span></a></span></span><span> </span><span id="local-6989586621679106505"><span class="annot"><span class="annottext">b -&gt; Char -&gt; b
</span><a href="#local-6989586621679106505"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679106504"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106504"><span class="hs-identifier hs-var">z0</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106503"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106503"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106502"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106502"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106501"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106501"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b -&gt; s -&gt; b
</span><a href="#local-6989586621679106500"><span class="hs-identifier hs-var">loop_foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106504"><span class="hs-identifier hs-var">z0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106502"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-519"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-520"></span><span>      </span><span id="local-6989586621679106500"><span class="annot"><span class="annottext">loop_foldl' :: b -&gt; s -&gt; b
</span><a href="#local-6989586621679106500"><span class="hs-identifier hs-var hs-var">loop_foldl'</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106499"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106499"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106498"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106498"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106503"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106498"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-521"></span><span>                            </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106499"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-522"></span><span>                            </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106497"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106497"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; s -&gt; b
</span><a href="#local-6989586621679106500"><span class="hs-identifier hs-var">loop_foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106499"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106497"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-523"></span><span>                            </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106496"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106496"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106495"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106495"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; s -&gt; b
</span><a href="#local-6989586621679106500"><span class="hs-identifier hs-var">loop_foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b -&gt; Char -&gt; b
</span><a href="#local-6989586621679106505"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106499"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106496"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106495"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-524"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl%27"><span class="hs-pragma hs-type">foldl'</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-525"></span><span>
</span><span id="line-526"></span><span class="hs-comment">-- | foldl1 is a variant of foldl that has no starting value argument,</span><span>
</span><span id="line-527"></span><span class="hs-comment">-- and thus must be applied to non-empty Streams.</span><span>
</span><span id="line-528"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl1"><span class="hs-identifier hs-type">foldl1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-529"></span><span id="foldl1"><span class="annot"><span class="annottext">foldl1 :: (Char -&gt; Char -&gt; Char) -&gt; Stream Char -&gt; Char
</span><a href="Data.Text.Internal.Fusion.Common.html#foldl1"><span class="hs-identifier hs-var hs-var">foldl1</span></a></span></span><span> </span><span id="local-6989586621679106494"><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Char
</span><a href="#local-6989586621679106494"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106493"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106493"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106492"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106492"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106491"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106491"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106490"><span class="hs-identifier hs-var">loop0_foldl1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106492"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-530"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-531"></span><span>      </span><span id="local-6989586621679106490"><span class="annot"><span class="annottext">loop0_foldl1 :: s -&gt; Char
</span><a href="#local-6989586621679106490"><span class="hs-identifier hs-var hs-var">loop0_foldl1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106489"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106489"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106493"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106489"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-532"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106488"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106488"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106490"><span class="hs-identifier hs-var">loop0_foldl1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106488"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-533"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106487"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106487"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106486"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106486"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106485"><span class="hs-identifier hs-var">loop_foldl1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106487"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106486"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-534"></span><span>                          </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;foldl1&quot;</span></span><span>
</span><span id="line-535"></span><span>      </span><span id="local-6989586621679106485"><span class="annot"><span class="annottext">loop_foldl1 :: Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106485"><span class="hs-identifier hs-var hs-var">loop_foldl1</span></a></span></span><span> </span><span id="local-6989586621679106484"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106484"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106483"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106483"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106493"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106483"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-536"></span><span>                           </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106484"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-537"></span><span>                           </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106482"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106482"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106485"><span class="hs-identifier hs-var">loop_foldl1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106484"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106482"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-538"></span><span>                           </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106481"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106481"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106480"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106480"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106485"><span class="hs-identifier hs-var">loop_foldl1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Char
</span><a href="#local-6989586621679106494"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106484"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106481"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106480"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-539"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl1"><span class="hs-pragma hs-type">foldl1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-540"></span><span>
</span><span id="line-541"></span><span class="hs-comment">-- | A strict version of foldl1.</span><span>
</span><span id="line-542"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl1%27"><span class="hs-identifier hs-type">foldl1'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-543"></span><span id="foldl1%27"><span class="annot"><span class="annottext">foldl1' :: (Char -&gt; Char -&gt; Char) -&gt; Stream Char -&gt; Char
</span><a href="Data.Text.Internal.Fusion.Common.html#foldl1%27"><span class="hs-identifier hs-var hs-var">foldl1'</span></a></span></span><span> </span><span id="local-6989586621679106479"><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Char
</span><a href="#local-6989586621679106479"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106478"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106478"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106477"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106477"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106476"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106476"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106475"><span class="hs-identifier hs-var">loop0_foldl1'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106477"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-544"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-545"></span><span>      </span><span id="local-6989586621679106475"><span class="annot"><span class="annottext">loop0_foldl1' :: s -&gt; Char
</span><a href="#local-6989586621679106475"><span class="hs-identifier hs-var hs-var">loop0_foldl1'</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106474"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106474"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106478"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106474"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-546"></span><span>                           </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106473"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106473"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106475"><span class="hs-identifier hs-var">loop0_foldl1'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106473"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-547"></span><span>                           </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106472"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106472"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106471"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106471"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106470"><span class="hs-identifier hs-var">loop_foldl1'</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106472"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106471"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-548"></span><span>                           </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;foldl1&quot;</span></span><span>
</span><span id="line-549"></span><span>      </span><span id="local-6989586621679106470"><span class="annot"><span class="annottext">loop_foldl1' :: Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106470"><span class="hs-identifier hs-var hs-var">loop_foldl1'</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106469"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106469"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106468"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106468"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106478"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106468"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-550"></span><span>                             </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106469"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-551"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106467"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106467"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106470"><span class="hs-identifier hs-var">loop_foldl1'</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106469"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106467"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-552"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106466"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106466"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106465"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106465"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106470"><span class="hs-identifier hs-var">loop_foldl1'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Char
</span><a href="#local-6989586621679106479"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106469"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106466"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106465"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-553"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldl1%27"><span class="hs-pragma hs-type">foldl1'</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span class="hs-comment">-- | 'foldr', applied to a binary operator, a starting value (typically the</span><span>
</span><span id="line-556"></span><span class="hs-comment">-- right-identity of the operator), and a stream, reduces the stream using the</span><span>
</span><span id="line-557"></span><span class="hs-comment">-- binary operator, from right to left.</span><span>
</span><span id="line-558"></span><span id="local-6989586621679107011"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldr"><span class="hs-identifier hs-type">foldr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107011"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107011"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107011"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107011"><span class="hs-identifier hs-type">b</span></a></span></span><span>
</span><span id="line-559"></span><span id="foldr"><span class="annot"><span class="annottext">foldr :: forall b. (Char -&gt; b -&gt; b) -&gt; b -&gt; Stream Char -&gt; b
</span><a href="Data.Text.Internal.Fusion.Common.html#foldr"><span class="hs-identifier hs-var hs-var">foldr</span></a></span></span><span> </span><span id="local-6989586621679106464"><span class="annot"><span class="annottext">Char -&gt; b -&gt; b
</span><a href="#local-6989586621679106464"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679106463"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106463"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106462"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106462"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106461"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106461"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106460"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106460"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; b
</span><a href="#local-6989586621679106459"><span class="hs-identifier hs-var">loop_foldr</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106461"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-560"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-561"></span><span>      </span><span id="local-6989586621679106459"><span class="annot"><span class="annottext">loop_foldr :: s -&gt; b
</span><a href="#local-6989586621679106459"><span class="hs-identifier hs-var hs-var">loop_foldr</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106458"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106458"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106462"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106458"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-562"></span><span>                        </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106463"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-563"></span><span>                        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106457"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106457"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; b
</span><a href="#local-6989586621679106459"><span class="hs-identifier hs-var">loop_foldr</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106457"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-564"></span><span>                        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106456"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106456"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106455"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106455"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; b -&gt; b
</span><a href="#local-6989586621679106464"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106456"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; b
</span><a href="#local-6989586621679106459"><span class="hs-identifier hs-var">loop_foldr</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106455"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-565"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldr"><span class="hs-pragma hs-type">foldr</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-566"></span><span>
</span><span id="line-567"></span><span class="hs-comment">-- | foldr1 is a variant of 'foldr' that has no starting value argument,</span><span>
</span><span id="line-568"></span><span class="hs-comment">-- and thus must be applied to non-empty streams.</span><span>
</span><span id="line-569"></span><span class="hs-comment">-- Subject to array fusion.</span><span>
</span><span id="line-570"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldr1"><span class="hs-identifier hs-type">foldr1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-571"></span><span id="foldr1"><span class="annot"><span class="annottext">foldr1 :: (Char -&gt; Char -&gt; Char) -&gt; Stream Char -&gt; Char
</span><a href="Data.Text.Internal.Fusion.Common.html#foldr1"><span class="hs-identifier hs-var hs-var">foldr1</span></a></span></span><span> </span><span id="local-6989586621679106454"><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Char
</span><a href="#local-6989586621679106454"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106453"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106453"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106452"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106452"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106451"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106451"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106450"><span class="hs-identifier hs-var">loop0_foldr1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106452"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-572"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-573"></span><span>    </span><span id="local-6989586621679106450"><span class="annot"><span class="annottext">loop0_foldr1 :: s -&gt; Char
</span><a href="#local-6989586621679106450"><span class="hs-identifier hs-var hs-var">loop0_foldr1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106449"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106449"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106453"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106449"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-574"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;foldr1&quot;</span></span><span>
</span><span id="line-575"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106448"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106448"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106450"><span class="hs-identifier hs-var">loop0_foldr1</span></a></span><span>  </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106448"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-576"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106447"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106447"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106446"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106446"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106445"><span class="hs-identifier hs-var">loop_foldr1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106447"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106446"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-577"></span><span>
</span><span id="line-578"></span><span>    </span><span id="local-6989586621679106445"><span class="annot"><span class="annottext">loop_foldr1 :: Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106445"><span class="hs-identifier hs-var hs-var">loop_foldr1</span></a></span></span><span> </span><span id="local-6989586621679106444"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106444"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106443"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106443"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106453"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106443"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-579"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106444"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-580"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>     </span><span id="local-6989586621679106442"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106442"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106445"><span class="hs-identifier hs-var">loop_foldr1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106444"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106442"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-581"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106441"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106441"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span id="local-6989586621679106440"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106440"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Char
</span><a href="#local-6989586621679106454"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106444"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106445"><span class="hs-identifier hs-var">loop_foldr1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106441"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106440"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-582"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#foldr1"><span class="hs-pragma hs-type">foldr1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-583"></span><span>
</span><span id="line-584"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#intercalate"><span class="hs-identifier hs-type">intercalate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-585"></span><span id="intercalate"><span class="annot"><span class="annottext">intercalate :: Stream Char -&gt; [Stream Char] -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#intercalate"><span class="hs-identifier hs-var hs-var">intercalate</span></a></span></span><span> </span><span id="local-6989586621679106439"><span class="annot"><span class="annottext">Stream Char
</span><a href="#local-6989586621679106439"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Stream Char] -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">([Stream Char] -&gt; Stream Char)
-&gt; ([Stream Char] -&gt; [Stream Char]) -&gt; [Stream Char] -&gt; Stream Char
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Stream Char -&gt; [Stream Char] -&gt; [Stream Char]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intersperse"><span class="hs-identifier hs-var">L.intersperse</span></a></span><span> </span><span class="annot"><span class="annottext">Stream Char
</span><a href="#local-6989586621679106439"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-586"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#intercalate"><span class="hs-pragma hs-type">intercalate</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-587"></span><span>
</span><span id="line-588"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-589"></span><span class="hs-comment">-- ** Special folds</span><span>
</span><span id="line-590"></span><span>
</span><span id="line-591"></span><span class="hs-comment">-- | /O(n)/ Concatenate a list of streams. Subject to array fusion.</span><span>
</span><span id="line-592"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#concat"><span class="hs-identifier hs-type">concat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-593"></span><span id="concat"><span class="annot"><span class="annottext">concat :: [Stream Char] -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#concat"><span class="hs-identifier hs-var hs-var">concat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Stream Char -&gt; Stream Char -&gt; Stream Char)
-&gt; Stream Char -&gt; [Stream Char] -&gt; Stream Char
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">L.foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Stream Char -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#append"><span class="hs-identifier hs-var">append</span></a></span><span> </span><span class="annot"><span class="annottext">Stream Char
forall a. Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-594"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#concat"><span class="hs-pragma hs-type">concat</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-595"></span><span>
</span><span id="line-596"></span><span class="hs-comment">-- | Map a function over a stream that results in a stream and concatenate the</span><span>
</span><span id="line-597"></span><span class="hs-comment">-- results.</span><span>
</span><span id="line-598"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#concatMap"><span class="hs-identifier hs-type">concatMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-599"></span><span id="concatMap"><span class="annot"><span class="annottext">concatMap :: (Char -&gt; Stream Char) -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#concatMap"><span class="hs-identifier hs-var hs-var">concatMap</span></a></span></span><span> </span><span id="local-6989586621679106435"><span class="annot"><span class="annottext">Char -&gt; Stream Char
</span><a href="#local-6989586621679106435"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Stream Char -&gt; Stream Char)
-&gt; Stream Char -&gt; Stream Char -&gt; Stream Char
forall b. (Char -&gt; b -&gt; b) -&gt; b -&gt; Stream Char -&gt; b
</span><a href="Data.Text.Internal.Fusion.Common.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Stream Char -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#append"><span class="hs-identifier hs-var">append</span></a></span><span> </span><span class="annot"><span class="annottext">(Stream Char -&gt; Stream Char -&gt; Stream Char)
-&gt; (Char -&gt; Stream Char) -&gt; Char -&gt; Stream Char -&gt; Stream Char
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Stream Char
</span><a href="#local-6989586621679106435"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Stream Char
forall a. Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-600"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#concatMap"><span class="hs-pragma hs-type">concatMap</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-601"></span><span>
</span><span id="line-602"></span><span class="hs-comment">-- | /O(n)/ any @p @xs determines if any character in the stream</span><span>
</span><span id="line-603"></span><span class="hs-comment">-- @xs@ satisfies the predicate @p@.</span><span>
</span><span id="line-604"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#any"><span class="hs-identifier hs-type">any</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-605"></span><span id="any"><span class="annot"><span class="annottext">any :: (Char -&gt; Bool) -&gt; Stream Char -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Common.html#any"><span class="hs-identifier hs-var hs-var">any</span></a></span></span><span> </span><span id="local-6989586621679106434"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106434"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106433"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106433"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106432"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106432"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106431"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106431"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106430"><span class="hs-identifier hs-var">loop_any</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106432"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-606"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-607"></span><span>      </span><span id="local-6989586621679106430"><span class="annot"><span class="annottext">loop_any :: s -&gt; Bool
</span><a href="#local-6989586621679106430"><span class="hs-identifier hs-var hs-var">loop_any</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106429"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106429"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106433"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106429"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-608"></span><span>                      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-609"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106428"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106428"><span class="hs-identifier hs-var">s'</span></a></span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106430"><span class="hs-identifier hs-var">loop_any</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106428"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-610"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106427"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106427"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106426"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106426"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106434"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106427"><span class="hs-identifier hs-var">x</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-611"></span><span>                                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106430"><span class="hs-identifier hs-var">loop_any</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106426"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-612"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#any"><span class="hs-pragma hs-type">any</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-613"></span><span>
</span><span id="line-614"></span><span class="hs-comment">-- | /O(n)/ all @p @xs determines if all characters in the 'Text'</span><span>
</span><span id="line-615"></span><span class="hs-comment">-- @xs@ satisfy the predicate @p@.</span><span>
</span><span id="line-616"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#all"><span class="hs-identifier hs-type">all</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-617"></span><span id="all"><span class="annot"><span class="annottext">all :: (Char -&gt; Bool) -&gt; Stream Char -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Common.html#all"><span class="hs-identifier hs-var hs-var">all</span></a></span></span><span> </span><span id="local-6989586621679106425"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106425"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106424"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106424"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106423"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106423"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106422"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106422"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106421"><span class="hs-identifier hs-var">loop_all</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106423"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-618"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-619"></span><span>      </span><span id="local-6989586621679106421"><span class="annot"><span class="annottext">loop_all :: s -&gt; Bool
</span><a href="#local-6989586621679106421"><span class="hs-identifier hs-var hs-var">loop_all</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106420"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106420"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106424"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106420"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-620"></span><span>                      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-621"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106419"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106419"><span class="hs-identifier hs-var">s'</span></a></span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106421"><span class="hs-identifier hs-var">loop_all</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106419"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-622"></span><span>                      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106418"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106418"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106417"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106417"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106425"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106418"><span class="hs-identifier hs-var">x</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106421"><span class="hs-identifier hs-var">loop_all</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106417"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-623"></span><span>                                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-624"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#all"><span class="hs-pragma hs-type">all</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-625"></span><span>
</span><span id="line-626"></span><span class="hs-comment">-- | /O(n)/ maximum returns the maximum value from a stream, which must be</span><span>
</span><span id="line-627"></span><span class="hs-comment">-- non-empty.</span><span>
</span><span id="line-628"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#maximum"><span class="hs-identifier hs-type">maximum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-629"></span><span id="maximum"><span class="annot"><span class="annottext">maximum :: Stream Char -&gt; Char
</span><a href="Data.Text.Internal.Fusion.Common.html#maximum"><span class="hs-identifier hs-var hs-var">maximum</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106416"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106416"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106415"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106415"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106414"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106414"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106413"><span class="hs-identifier hs-var">loop0_maximum</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106415"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-630"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-631"></span><span>      </span><span id="local-6989586621679106413"><span class="annot"><span class="annottext">loop0_maximum :: s -&gt; Char
</span><a href="#local-6989586621679106413"><span class="hs-identifier hs-var hs-var">loop0_maximum</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106412"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106412"><span class="hs-identifier hs-var">s</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106416"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106412"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-632"></span><span>                             </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;maximum&quot;</span></span><span>
</span><span id="line-633"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106411"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106411"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106413"><span class="hs-identifier hs-var">loop0_maximum</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106411"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-634"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106410"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106410"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106409"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106409"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106408"><span class="hs-identifier hs-var">loop_maximum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106410"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106409"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-635"></span><span>      </span><span id="local-6989586621679106408"><span class="annot"><span class="annottext">loop_maximum :: Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106408"><span class="hs-identifier hs-var hs-var">loop_maximum</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106405"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106405"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106404"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106404"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106416"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106404"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-636"></span><span>                             </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106405"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-637"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106403"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106403"><span class="hs-identifier hs-var">s'</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106408"><span class="hs-identifier hs-var">loop_maximum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106405"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106403"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-638"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106402"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106402"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106401"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106401"><span class="hs-identifier hs-var">s'</span></a></span></span><span>
</span><span id="line-639"></span><span>                                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106402"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106405"><span class="hs-identifier hs-var">z</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106408"><span class="hs-identifier hs-var">loop_maximum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106402"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106401"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-640"></span><span>                                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106408"><span class="hs-identifier hs-var">loop_maximum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106405"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106401"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-641"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#maximum"><span class="hs-pragma hs-type">maximum</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-642"></span><span>
</span><span id="line-643"></span><span class="hs-comment">-- | /O(n)/ minimum returns the minimum value from a 'Text', which must be</span><span>
</span><span id="line-644"></span><span class="hs-comment">-- non-empty.</span><span>
</span><span id="line-645"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#minimum"><span class="hs-identifier hs-type">minimum</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-646"></span><span id="minimum"><span class="annot"><span class="annottext">minimum :: Stream Char -&gt; Char
</span><a href="Data.Text.Internal.Fusion.Common.html#minimum"><span class="hs-identifier hs-var hs-var">minimum</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106400"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106400"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106399"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106399"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106398"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106398"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106397"><span class="hs-identifier hs-var">loop0_minimum</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106399"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-647"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-648"></span><span>      </span><span id="local-6989586621679106397"><span class="annot"><span class="annottext">loop0_minimum :: s -&gt; Char
</span><a href="#local-6989586621679106397"><span class="hs-identifier hs-var hs-var">loop0_minimum</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106396"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106396"><span class="hs-identifier hs-var">s</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106400"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106396"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-649"></span><span>                             </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Char
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var">emptyError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;minimum&quot;</span></span><span>
</span><span id="line-650"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106395"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106395"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Char
</span><a href="#local-6989586621679106397"><span class="hs-identifier hs-var">loop0_minimum</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106395"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-651"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106394"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106394"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106393"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106393"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106392"><span class="hs-identifier hs-var">loop_minimum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106394"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106393"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-652"></span><span>      </span><span id="local-6989586621679106392"><span class="annot"><span class="annottext">loop_minimum :: Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106392"><span class="hs-identifier hs-var hs-var">loop_minimum</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106390"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106390"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106389"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106389"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106400"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106389"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-653"></span><span>                             </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106390"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-654"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106388"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106388"><span class="hs-identifier hs-var">s'</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106392"><span class="hs-identifier hs-var">loop_minimum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106390"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106388"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-655"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106387"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106387"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106386"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106386"><span class="hs-identifier hs-var">s'</span></a></span></span><span>
</span><span id="line-656"></span><span>                                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106387"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106390"><span class="hs-identifier hs-var">z</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106392"><span class="hs-identifier hs-var">loop_minimum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106387"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106386"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-657"></span><span>                                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Char
</span><a href="#local-6989586621679106392"><span class="hs-identifier hs-var">loop_minimum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106390"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106386"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-658"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#minimum"><span class="hs-pragma hs-type">minimum</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-659"></span><span>
</span><span id="line-660"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-661"></span><span class="hs-comment">-- * Building streams</span><span>
</span><span id="line-662"></span><span>
</span><span id="line-663"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#scanl"><span class="hs-identifier hs-type">scanl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-664"></span><span id="scanl"><span class="annot"><span class="annottext">scanl :: (Char -&gt; Char -&gt; Char) -&gt; Char -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#scanl"><span class="hs-identifier hs-var hs-var">scanl</span></a></span></span><span> </span><span id="local-6989586621679106385"><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Char
</span><a href="#local-6989586621679106385"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679106384"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106384"><span class="hs-identifier hs-var">z0</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106381"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106381"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106380"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106380"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106379"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106379"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Scan s -&gt; Step (Scan s) Char) -&gt; Scan s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">Scan s -&gt; Step (Scan s) Char
</span><a href="#local-6989586621679106378"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Scan s
forall s. Char -&gt; s -&gt; Scan s
</span><a href="Data.Text.Internal.Fusion.Types.html#Scan1"><span class="hs-identifier hs-var">Scan1</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106384"><span class="hs-identifier hs-var">z0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106380"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106379"><span class="hs-identifier hs-var">len</span></a></span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Size
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- HINT maybe too low</span><span>
</span><span id="line-665"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-666"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679106378"><span class="hs-pragma hs-type">next</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-667"></span><span>    </span><span id="local-6989586621679106378"><span class="annot"><span class="annottext">next :: Scan s -&gt; Step (Scan s) Char
</span><a href="#local-6989586621679106378"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Scan1"><span class="hs-identifier hs-type">Scan1</span></a></span><span> </span><span id="local-6989586621679106376"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106376"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679106375"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106375"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Scan s -&gt; Step (Scan s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106376"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Scan s
forall s. Char -&gt; s -&gt; Scan s
</span><a href="Data.Text.Internal.Fusion.Types.html#Scan2"><span class="hs-identifier hs-var">Scan2</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106376"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106375"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-668"></span><span>    </span><span class="annot"><a href="#local-6989586621679106378"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Scan2"><span class="hs-identifier hs-type">Scan2</span></a></span><span> </span><span id="local-6989586621679106373"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106373"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span id="local-6989586621679106372"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106372"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106381"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106372"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-669"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106371"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106371"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106370"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106370"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106369"><span class="annot"><span class="annottext">x' :: Char
</span><a href="#local-6989586621679106369"><span class="hs-identifier hs-var hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Char
</span><a href="#local-6989586621679106385"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106373"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106371"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-670"></span><span>                                       </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Scan s -&gt; Step (Scan s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106369"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Scan s
forall s. Char -&gt; s -&gt; Scan s
</span><a href="Data.Text.Internal.Fusion.Types.html#Scan2"><span class="hs-identifier hs-var">Scan2</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106369"><span class="hs-identifier hs-var">x'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106370"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-671"></span><span>                         </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106368"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106368"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Scan s -&gt; Step (Scan s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Scan s
forall s. Char -&gt; s -&gt; Scan s
</span><a href="Data.Text.Internal.Fusion.Types.html#Scan2"><span class="hs-identifier hs-var">Scan2</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106373"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106368"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-672"></span><span>                         </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (Scan s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-673"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#scanl"><span class="hs-pragma hs-type">scanl</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-674"></span><span>
</span><span id="line-675"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-676"></span><span class="hs-comment">-- ** Generating and unfolding streams</span><span>
</span><span id="line-677"></span><span>
</span><span id="line-678"></span><span id="local-6989586621679106993"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#replicateCharI"><span class="hs-identifier hs-type">replicateCharI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106993"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106993"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span></span><span>
</span><span id="line-679"></span><span id="replicateCharI"><span class="annot"><span class="annottext">replicateCharI :: forall a. Integral a =&gt; a -&gt; Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#replicateCharI"><span class="hs-identifier hs-var hs-var">replicateCharI</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106358"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106358"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106357"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106357"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-680"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106358"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Stream Char
forall a. Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-681"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Step a Char) -&gt; a -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Step a Char
</span><a href="#local-6989586621679106356"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Size
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106358"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- HINT maybe too low</span><span>
</span><span id="line-682"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-683"></span><span>    </span><span id="local-6989586621679106356"><span class="annot"><span class="annottext">next :: a -&gt; Step a Char
</span><a href="#local-6989586621679106356"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106352"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106352"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106352"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106358"><span class="hs-identifier hs-var">n</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step a Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-684"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; a -&gt; Step a Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106357"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106352"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-685"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#replicateCharI"><span class="hs-pragma hs-type">replicateCharI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-686"></span><span>
</span><span id="line-687"></span><span class="hs-keyword">data</span><span> </span><span id="RI"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#RI"><span class="hs-identifier hs-var">RI</span></a></span></span><span> </span><span id="local-6989586621679106989"><span class="annot"><a href="#local-6989586621679106989"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="RI"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#RI"><span class="hs-identifier hs-var">RI</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106989"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span>
</span><span id="line-688"></span><span>
</span><span id="line-689"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#replicateI"><span class="hs-identifier hs-type">replicateI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-690"></span><span id="replicateI"><span class="annot"><span class="annottext">replicateI :: Int64 -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#replicateI"><span class="hs-identifier hs-var hs-var">replicateI</span></a></span></span><span> </span><span id="local-6989586621679106350"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679106350"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106343"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106343"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106342"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106342"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106341"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106341"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-691"></span><span>    </span><span class="annot"><span class="annottext">(RI s -&gt; Step (RI s) Char) -&gt; RI s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">RI s -&gt; Step (RI s) Char
</span><a href="#local-6989586621679106340"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Int64 -&gt; RI s
forall s. s -&gt; Int64 -&gt; RI s
</span><a href="Data.Text.Internal.Fusion.Common.html#RI"><span class="hs-identifier hs-var">RI</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106342"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64 -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Common.html#int64ToSize"><span class="hs-identifier hs-var">int64ToSize</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679106350"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106341"><span class="hs-identifier hs-var">len</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-692"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-693"></span><span>    </span><span id="local-6989586621679106340"><span class="annot"><span class="annottext">next :: RI s -&gt; Step (RI s) Char
</span><a href="#local-6989586621679106340"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#RI"><span class="hs-identifier hs-type">RI</span></a></span><span> </span><span id="local-6989586621679106334"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106334"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679106333"><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679106333"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-694"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679106333"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679106350"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step (RI s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-695"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106343"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106334"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-696"></span><span>                        </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RI s -&gt; Step (RI s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Int64 -&gt; RI s
forall s. s -&gt; Int64 -&gt; RI s
</span><a href="Data.Text.Internal.Fusion.Common.html#RI"><span class="hs-identifier hs-var">RI</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106342"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679106333"><span class="hs-identifier hs-var">k</span></a></span><span class="annot"><span class="annottext">Int64 -&gt; Int64 -&gt; Int64
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int64
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-697"></span><span>                        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106332"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106332"><span class="hs-identifier hs-var">s'</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RI s -&gt; Step (RI s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Int64 -&gt; RI s
forall s. s -&gt; Int64 -&gt; RI s
</span><a href="Data.Text.Internal.Fusion.Common.html#RI"><span class="hs-identifier hs-var">RI</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106332"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679106333"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-698"></span><span>                        </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106331"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106331"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106330"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106330"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; RI s -&gt; Step (RI s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106331"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Int64 -&gt; RI s
forall s. s -&gt; Int64 -&gt; RI s
</span><a href="Data.Text.Internal.Fusion.Common.html#RI"><span class="hs-identifier hs-var">RI</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106330"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="annot"><span class="annottext">Int64
</span><a href="#local-6989586621679106333"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-699"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#replicateI"><span class="hs-pragma hs-type">replicateI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-700"></span><span>
</span><span id="line-701"></span><span class="hs-comment">-- | /O(n)/, where @n@ is the length of the result. The unfoldr function</span><span>
</span><span id="line-702"></span><span class="hs-comment">-- is analogous to the List 'unfoldr'. unfoldr builds a stream</span><span>
</span><span id="line-703"></span><span class="hs-comment">-- from a seed value. The function takes the element and returns</span><span>
</span><span id="line-704"></span><span class="hs-comment">-- Nothing if it is done producing the stream or returns Just</span><span>
</span><span id="line-705"></span><span class="hs-comment">-- (a,b), in which case, a is the next Char in the string, and b is</span><span>
</span><span id="line-706"></span><span class="hs-comment">-- the seed value for further production.</span><span>
</span><span id="line-707"></span><span id="local-6989586621679106988"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unfoldr"><span class="hs-identifier hs-type">unfoldr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679106988"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679106988"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106988"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span></span><span>
</span><span id="line-708"></span><span id="unfoldr"><span class="annot"><span class="annottext">unfoldr :: forall a. (a -&gt; Maybe (Char, a)) -&gt; a -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#unfoldr"><span class="hs-identifier hs-var hs-var">unfoldr</span></a></span></span><span> </span><span id="local-6989586621679106329"><span class="annot"><span class="annottext">a -&gt; Maybe (Char, a)
</span><a href="#local-6989586621679106329"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679106328"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106328"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Step a Char) -&gt; a -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Step a Char
</span><a href="#local-6989586621679106327"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106328"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span>
</span><span id="line-709"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-710"></span><span>      </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679106327"><span class="hs-pragma hs-type">next</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-711"></span><span>      </span><span id="local-6989586621679106327"><span class="annot"><span class="annottext">next :: a -&gt; Step a Char
</span><a href="#local-6989586621679106327"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106326"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106326"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe (Char, a)
</span><a href="#local-6989586621679106329"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106326"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-712"></span><span>                 </span><span class="annot"><span class="annottext">Maybe (Char, a)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step a Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-713"></span><span>                 </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679106325"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106325"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679106324"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106324"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; a -&gt; Step a Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106325"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106324"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-714"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unfoldr"><span class="hs-pragma hs-type">unfoldr</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-715"></span><span>
</span><span id="line-716"></span><span class="hs-comment">-- | /O(n)/ Like 'unfoldr', 'unfoldrNI' builds a stream from a seed</span><span>
</span><span id="line-717"></span><span class="hs-comment">-- value. However, the length of the result is limited by the</span><span>
</span><span id="line-718"></span><span class="hs-comment">-- first argument to 'unfoldrNI'. This function is more efficient than</span><span>
</span><span id="line-719"></span><span class="hs-comment">-- 'unfoldr' when the length of the result is known.</span><span>
</span><span id="line-720"></span><span id="local-6989586621679106985"><span id="local-6989586621679106986"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unfoldrNI"><span class="hs-identifier hs-type">unfoldrNI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106986"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106986"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679106985"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679106985"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106985"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span></span></span><span>
</span><span id="line-721"></span><span id="unfoldrNI"><span class="annot"><span class="annottext">unfoldrNI :: forall a b.
Integral a =&gt;
a -&gt; (b -&gt; Maybe (Char, b)) -&gt; b -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#unfoldrNI"><span class="hs-identifier hs-var hs-var">unfoldrNI</span></a></span></span><span> </span><span id="local-6989586621679106312"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106312"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679106311"><span class="annot"><span class="annottext">b -&gt; Maybe (Char, b)
</span><a href="#local-6989586621679106311"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679106310"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106310"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106312"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Stream Char
forall a. Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-722"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PairS a b -&gt; Step (PairS a b) Char)
-&gt; PairS a b -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">PairS a b -&gt; Step (PairS a b) Char
</span><a href="#local-6989586621679106309"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; PairS a b
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106310"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#maxSize"><span class="hs-identifier hs-var">maxSize</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Size) -&gt; Int -&gt; Size
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106312"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-723"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-724"></span><span>      </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679106309"><span class="hs-pragma hs-type">next</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-725"></span><span>      </span><span id="local-6989586621679106309"><span class="annot"><span class="annottext">next :: PairS a b -&gt; Step (PairS a b) Char
</span><a href="#local-6989586621679106309"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679106304"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106304"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span id="local-6989586621679106303"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106303"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">b -&gt; Maybe (Char, b)
</span><a href="#local-6989586621679106311"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106303"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-726"></span><span>          </span><span class="annot"><span class="annottext">Maybe (Char, b)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (PairS a b) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-727"></span><span>          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679106302"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106302"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679106301"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106301"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106304"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106312"><span class="hs-identifier hs-var">n</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (PairS a b) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-728"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; PairS a b -&gt; Step (PairS a b) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106302"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106304"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; PairS a b
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679106301"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-729"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#unfoldrNI"><span class="hs-pragma hs-type">unfoldrNI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-730"></span><span>
</span><span id="line-731"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-732"></span><span class="hs-comment">--  * Substreams</span><span>
</span><span id="line-733"></span><span>
</span><span id="line-734"></span><span class="hs-comment">-- | /O(n)/ @'take' n@, applied to a stream, returns the prefix of the</span><span>
</span><span id="line-735"></span><span class="hs-comment">-- stream of length @n@, or the stream itself if @n@ is greater than the</span><span>
</span><span id="line-736"></span><span class="hs-comment">-- length of the stream.</span><span>
</span><span id="line-737"></span><span id="local-6989586621679106982"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#take"><span class="hs-identifier hs-type">take</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106982"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106982"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span></span><span>
</span><span id="line-738"></span><span id="take"><span class="annot"><span class="annottext">take :: forall a. Integral a =&gt; a -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#take"><span class="hs-identifier hs-var hs-var">take</span></a></span></span><span> </span><span id="local-6989586621679106296"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106296"><span class="hs-identifier hs-var">n0</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106291"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106291"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106290"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106290"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106289"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106289"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-739"></span><span>    </span><span class="annot"><span class="annottext">(PairS a s -&gt; Step (PairS a s) Char)
-&gt; PairS a s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">PairS a s -&gt; Step (PairS a s) Char
forall {a}. (Ord a, Num a) =&gt; PairS a s -&gt; Step (PairS a s) Char
</span><a href="#local-6989586621679106288"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106287"><span class="hs-identifier hs-var">n0'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; PairS a s
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106290"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-var">smaller</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106289"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Size) -&gt; Int -&gt; Size
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106287"><span class="hs-identifier hs-var">n0'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-740"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-741"></span><span>      </span><span id="local-6989586621679106287"><span class="annot"><span class="annottext">n0' :: a
</span><a href="#local-6989586621679106287"><span class="hs-identifier hs-var hs-var">n0'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106296"><span class="hs-identifier hs-var">n0</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-742"></span><span>
</span><span id="line-743"></span><span>      </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679106288"><span class="hs-pragma hs-type">next</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-744"></span><span>      </span><span id="local-6989586621679106288"><span class="annot"><span class="annottext">next :: PairS a s -&gt; Step (PairS a s) Char
</span><a href="#local-6989586621679106288"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679106277"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106277"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span id="local-6989586621679106276"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106276"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106277"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step (PairS a s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-745"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106291"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106276"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-746"></span><span>                                     </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (PairS a s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-747"></span><span>                                     </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106275"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106275"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PairS a s -&gt; Step (PairS a s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106277"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; PairS a s
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106275"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-748"></span><span>                                     </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106274"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106274"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106273"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106273"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; PairS a s -&gt; Step (PairS a s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106274"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106277"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; PairS a s
forall a b. a -&gt; b -&gt; PairS a b
</span><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106273"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-749"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#take"><span class="hs-pragma hs-type">take</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-750"></span><span>
</span><span id="line-751"></span><span class="hs-keyword">data</span><span> </span><span id="Drop"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Drop"><span class="hs-identifier hs-var">Drop</span></a></span></span><span> </span><span id="local-6989586621679106974"><span class="annot"><a href="#local-6989586621679106974"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621679106973"><span class="annot"><a href="#local-6989586621679106973"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="NS"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#NS"><span class="hs-identifier hs-var">NS</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106973"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-752"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="JS"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#JS"><span class="hs-identifier hs-var">JS</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106974"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106973"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-753"></span><span>
</span><span id="line-754"></span><span class="hs-comment">-- | /O(n)/ @'drop' n@, applied to a stream, returns the suffix of the</span><span>
</span><span id="line-755"></span><span class="hs-comment">-- stream after the first @n@ characters, or the empty stream if @n@</span><span>
</span><span id="line-756"></span><span class="hs-comment">-- is greater than the length of the stream.</span><span>
</span><span id="line-757"></span><span id="local-6989586621679106270"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#drop"><span class="hs-identifier hs-type">drop</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106270"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106270"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span></span><span>
</span><span id="line-758"></span><span id="drop"><span class="annot"><span class="annottext">drop :: forall a. Integral a =&gt; a -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#drop"><span class="hs-identifier hs-var hs-var">drop</span></a></span></span><span> </span><span id="local-6989586621679106265"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106265"><span class="hs-identifier hs-var">n0</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106259"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106259"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106258"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106258"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106257"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106257"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-759"></span><span>    </span><span class="annot"><span class="annottext">(Drop a s -&gt; Step (Drop a s) Char)
-&gt; Drop a s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">Drop a s -&gt; Step (Drop a s) Char
forall {a}. (Ord a, Num a) =&gt; Drop a s -&gt; Step (Drop a s) Char
</span><a href="#local-6989586621679106256"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; s -&gt; Drop a s
forall a s. a -&gt; s -&gt; Drop a s
</span><a href="Data.Text.Internal.Fusion.Common.html#JS"><span class="hs-identifier hs-var">JS</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106255"><span class="hs-identifier hs-var">n0'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106258"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106257"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#codePointsSize"><span class="hs-identifier hs-var">codePointsSize</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106255"><span class="hs-identifier hs-var">n0'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-760"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-761"></span><span>    </span><span id="local-6989586621679106255"><span class="annot"><span class="annottext">n0' :: a
</span><a href="#local-6989586621679106255"><span class="hs-identifier hs-var hs-var">n0'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106265"><span class="hs-identifier hs-var">n0</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-762"></span><span>
</span><span id="line-763"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679106256"><span class="hs-pragma hs-type">next</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-764"></span><span>    </span><span id="local-6989586621679106256"><span class="annot"><span class="annottext">next :: Drop a s -&gt; Step (Drop a s) Char
</span><a href="#local-6989586621679106256"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#JS"><span class="hs-identifier hs-type">JS</span></a></span><span> </span><span id="local-6989586621679106246"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106246"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679106245"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106245"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-765"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106246"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Drop a s -&gt; Step (Drop a s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Drop a s
forall a s. s -&gt; Drop a s
</span><a href="Data.Text.Internal.Fusion.Common.html#NS"><span class="hs-identifier hs-var">NS</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106245"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-766"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106259"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106245"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-767"></span><span>          </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (Drop a s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-768"></span><span>          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106244"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106244"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Drop a s -&gt; Step (Drop a s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; s -&gt; Drop a s
forall a s. a -&gt; s -&gt; Drop a s
</span><a href="Data.Text.Internal.Fusion.Common.html#JS"><span class="hs-identifier hs-var">JS</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106246"><span class="hs-identifier hs-var">n</span></a></span><span>    </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106244"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-769"></span><span>          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679106243"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106243"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Drop a s -&gt; Step (Drop a s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; s -&gt; Drop a s
forall a s. a -&gt; s -&gt; Drop a s
</span><a href="Data.Text.Internal.Fusion.Common.html#JS"><span class="hs-identifier hs-var">JS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106246"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106243"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-770"></span><span>    </span><span class="annot"><a href="#local-6989586621679106256"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#NS"><span class="hs-identifier hs-type">NS</span></a></span><span> </span><span id="local-6989586621679106242"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106242"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106259"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106242"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-771"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (Drop a s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-772"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106241"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106241"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Drop a s -&gt; Step (Drop a s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Drop a s
forall a s. s -&gt; Drop a s
</span><a href="Data.Text.Internal.Fusion.Common.html#NS"><span class="hs-identifier hs-var">NS</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106241"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-773"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106240"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106240"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106239"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106239"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Drop a s -&gt; Step (Drop a s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106240"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Drop a s
forall a s. s -&gt; Drop a s
</span><a href="Data.Text.Internal.Fusion.Common.html#NS"><span class="hs-identifier hs-var">NS</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106239"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-774"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#drop"><span class="hs-pragma hs-type">drop</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-775"></span><span>
</span><span id="line-776"></span><span class="hs-comment">-- | 'takeWhile', applied to a predicate @p@ and a stream, returns the</span><span>
</span><span id="line-777"></span><span class="hs-comment">-- longest prefix (possibly empty) of elements that satisfy @p@.</span><span>
</span><span id="line-778"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#takeWhile"><span class="hs-identifier hs-type">takeWhile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-779"></span><span id="takeWhile"><span class="annot"><span class="annottext">takeWhile :: (Char -&gt; Bool) -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#takeWhile"><span class="hs-identifier hs-var hs-var">takeWhile</span></a></span></span><span> </span><span id="local-6989586621679106238"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106238"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106236"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106236"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106235"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106235"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106234"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106234"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(s -&gt; Step s Char) -&gt; s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106233"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106235"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106234"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-780"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-781"></span><span>      </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679106233"><span class="hs-pragma hs-type">next</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-782"></span><span>      </span><span id="local-6989586621679106233"><span class="annot"><span class="annottext">next :: s -&gt; Step s Char
</span><a href="#local-6989586621679106233"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106232"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106232"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106236"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106232"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-783"></span><span>                  </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step s Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-784"></span><span>                  </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106231"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106231"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106231"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-785"></span><span>                  </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106230"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106230"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106229"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106229"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106238"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106230"><span class="hs-identifier hs-var">x</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Step s Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106230"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106229"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-786"></span><span>                             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step s Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-787"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#takeWhile"><span class="hs-pragma hs-type">takeWhile</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-788"></span><span>
</span><span id="line-789"></span><span class="hs-comment">-- | @'dropWhile' p xs@ returns the suffix remaining after @'takeWhile' p xs@.</span><span>
</span><span id="line-790"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#dropWhile"><span class="hs-identifier hs-type">dropWhile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-791"></span><span id="dropWhile"><span class="annot"><span class="annottext">dropWhile :: (Char -&gt; Bool) -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#dropWhile"><span class="hs-identifier hs-var hs-var">dropWhile</span></a></span></span><span> </span><span id="local-6989586621679106228"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106228"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106226"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106226"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106225"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106225"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106224"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106224"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(E s s -&gt; Step (E s s) Char) -&gt; E s s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">E s s -&gt; Step (E s s) Char
</span><a href="#local-6989586621679106223"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. l -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106225"><span class="hs-identifier hs-var">s0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106224"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-792"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-793"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="#local-6989586621679106223"><span class="hs-pragma hs-type">next</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-794"></span><span>    </span><span id="local-6989586621679106223"><span class="annot"><span class="annottext">next :: E s s -&gt; Step (E s s) Char
</span><a href="#local-6989586621679106223"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621679106222"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106222"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106226"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106222"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-795"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (E s s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-796"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106221"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106221"><span class="hs-identifier hs-var">s'</span></a></span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">E s s -&gt; Step (E s s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. l -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106221"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-797"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106220"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106220"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106219"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106219"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106228"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106220"><span class="hs-identifier hs-var">x</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">E s s -&gt; Step (E s s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. l -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106219"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-798"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; E s s -&gt; Step (E s s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106220"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. r -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-var">R</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106219"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-799"></span><span>    </span><span class="annot"><a href="#local-6989586621679106223"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-type">R</span></a></span><span> </span><span id="local-6989586621679106218"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106218"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106226"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106218"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-800"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (E s s) Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-801"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106217"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106217"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">E s s -&gt; Step (E s s) Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. r -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-var">R</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106217"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-802"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106216"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106216"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106215"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106215"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; E s s -&gt; Step (E s s) Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106216"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; E s s
forall l r. r -&gt; E l r
</span><a href="Data.Text.Internal.Fusion.Common.html#R"><span class="hs-identifier hs-var">R</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106215"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-803"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#dropWhile"><span class="hs-pragma hs-type">dropWhile</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-804"></span><span>
</span><span id="line-805"></span><span class="hs-comment">-- | /O(n)/ The 'isPrefixOf' function takes two 'Stream's and returns</span><span>
</span><span id="line-806"></span><span class="hs-comment">-- 'True' iff the first is a prefix of the second.</span><span>
</span><span id="line-807"></span><span id="local-6989586621679106970"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#isPrefixOf"><span class="hs-identifier hs-type">isPrefixOf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106970"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106970"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106970"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-808"></span><span id="isPrefixOf"><span class="annot"><span class="annottext">isPrefixOf :: forall a. Eq a =&gt; Stream a -&gt; Stream a -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Common.html#isPrefixOf"><span class="hs-identifier hs-var hs-var">isPrefixOf</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106213"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106213"><span class="hs-identifier hs-var">next1</span></a></span></span><span> </span><span id="local-6989586621679106212"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106212"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106211"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106211"><span class="hs-identifier hs-var">next2</span></a></span></span><span> </span><span id="local-6989586621679106210"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106210"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106213"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106212"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106211"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106210"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-809"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-810"></span><span>      </span><span id="local-6989586621679106209"><span class="annot"><span class="annottext">loop :: Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679106209"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>      </span><span class="annot"><span class="annottext">Step s a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-811"></span><span>      </span><span class="annot"><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-812"></span><span>      </span><span class="annot"><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106207"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106207"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106206"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106206"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106213"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106207"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106211"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106206"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-813"></span><span>      </span><span class="annot"><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106205"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106205"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span>     </span><span id="local-6989586621679106204"><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679106204"><span class="hs-identifier hs-var">x2</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106213"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106205"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679106204"><span class="hs-identifier hs-var">x2</span></a></span><span>
</span><span id="line-814"></span><span>      </span><span class="annot"><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span id="local-6989586621679106203"><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679106203"><span class="hs-identifier hs-var">x1</span></a></span></span><span>             </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106202"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106202"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679106203"><span class="hs-identifier hs-var">x1</span></a></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106211"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106202"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-815"></span><span>      </span><span class="annot"><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106201"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106201"><span class="hs-identifier hs-var">x1</span></a></span></span><span> </span><span id="local-6989586621679106200"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106200"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106199"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106199"><span class="hs-identifier hs-var">x2</span></a></span></span><span> </span><span id="local-6989586621679106198"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106198"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106201"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106199"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-816"></span><span>                                           </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679106209"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106213"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106200"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106211"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106198"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-817"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#isPrefixOf"><span class="hs-pragma hs-type">isPrefixOf</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-818"></span><span>
</span><span id="line-819"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-820"></span><span class="hs-comment">-- * Searching</span><span>
</span><span id="line-821"></span><span>
</span><span id="line-822"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-823"></span><span class="hs-comment">-- ** Searching by equality</span><span>
</span><span id="line-824"></span><span>
</span><span id="line-825"></span><span class="hs-comment">-- | /O(n)/ 'elem' is the stream membership predicate.</span><span>
</span><span id="line-826"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#elem"><span class="hs-identifier hs-type">elem</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-827"></span><span id="elem"><span class="annot"><span class="annottext">elem :: Char -&gt; Stream Char -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Common.html#elem"><span class="hs-identifier hs-var hs-var">elem</span></a></span></span><span> </span><span id="local-6989586621679106197"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106197"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106196"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106196"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106195"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106195"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106194"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106194"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106193"><span class="hs-identifier hs-var">loop_elem</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106195"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-828"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-829"></span><span>      </span><span id="local-6989586621679106193"><span class="annot"><span class="annottext">loop_elem :: s -&gt; Bool
</span><a href="#local-6989586621679106193"><span class="hs-identifier hs-var hs-var">loop_elem</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106190"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106190"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106196"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106190"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-830"></span><span>                       </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-831"></span><span>                       </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106189"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106189"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106193"><span class="hs-identifier hs-var">loop_elem</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106189"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-832"></span><span>                       </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106188"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106188"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106187"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106187"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106188"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106197"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-833"></span><span>                                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Bool
</span><a href="#local-6989586621679106193"><span class="hs-identifier hs-var">loop_elem</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106187"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-834"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#elem"><span class="hs-pragma hs-type">elem</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-835"></span><span>
</span><span id="line-836"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-837"></span><span class="hs-comment">-- ** Searching with a predicate</span><span>
</span><span id="line-838"></span><span>
</span><span id="line-839"></span><span class="hs-comment">-- | /O(n)/ The 'findBy' function takes a predicate and a stream,</span><span>
</span><span id="line-840"></span><span class="hs-comment">-- and returns the first element in matching the predicate, or 'Nothing'</span><span>
</span><span id="line-841"></span><span class="hs-comment">-- if there is no such element.</span><span>
</span><span id="line-842"></span><span>
</span><span id="line-843"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#findBy"><span class="hs-identifier hs-type">findBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-844"></span><span id="findBy"><span class="annot"><span class="annottext">findBy :: (Char -&gt; Bool) -&gt; Stream Char -&gt; Maybe Char
</span><a href="Data.Text.Internal.Fusion.Common.html#findBy"><span class="hs-identifier hs-var hs-var">findBy</span></a></span></span><span> </span><span id="local-6989586621679106186"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106186"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106185"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106185"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106184"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106184"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106183"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106183"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; Maybe Char
</span><a href="#local-6989586621679106182"><span class="hs-identifier hs-var">loop_find</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106184"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-845"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-846"></span><span>      </span><span id="local-6989586621679106182"><span class="annot"><span class="annottext">loop_find :: s -&gt; Maybe Char
</span><a href="#local-6989586621679106182"><span class="hs-identifier hs-var hs-var">loop_find</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106181"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106181"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106185"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106181"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-847"></span><span>                       </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Char
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-848"></span><span>                       </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106180"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106180"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Maybe Char
</span><a href="#local-6989586621679106182"><span class="hs-identifier hs-var">loop_find</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106180"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-849"></span><span>                       </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106179"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106179"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106178"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106178"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106186"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106179"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Maybe Char
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106179"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-850"></span><span>                                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Maybe Char
</span><a href="#local-6989586621679106182"><span class="hs-identifier hs-var">loop_find</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106178"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-851"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#findBy"><span class="hs-pragma hs-type">findBy</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-852"></span><span>
</span><span id="line-853"></span><span class="hs-comment">-- | /O(n)/ Stream index (subscript) operator, starting from 0.</span><span>
</span><span id="line-854"></span><span id="local-6989586621679106964"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#indexI"><span class="hs-identifier hs-type">indexI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106964"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106964"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span></span><span>
</span><span id="line-855"></span><span id="indexI"><span class="annot"><span class="annottext">indexI :: forall a. Integral a =&gt; Stream Char -&gt; a -&gt; Char
</span><a href="Data.Text.Internal.Fusion.Common.html#indexI"><span class="hs-identifier hs-var hs-var">indexI</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106167"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106167"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106166"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106166"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106165"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106165"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679106164"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106164"><span class="hs-identifier hs-var">n0</span></a></span></span><span>
</span><span id="line-856"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106164"><span class="hs-identifier hs-var">n0</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Char
forall a. String -&gt; String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#streamError"><span class="hs-identifier hs-var">streamError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;index&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Negative index&quot;</span></span><span>
</span><span id="line-857"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; Char
forall {a}. (Eq a, Num a) =&gt; a -&gt; s -&gt; Char
</span><a href="#local-6989586621679106163"><span class="hs-identifier hs-var">loop_index</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106164"><span class="hs-identifier hs-var">n0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106166"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-858"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-859"></span><span>    </span><span id="local-6989586621679106163"><span class="annot"><span class="annottext">loop_index :: a -&gt; s -&gt; Char
</span><a href="#local-6989586621679106163"><span class="hs-identifier hs-var hs-var">loop_index</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106156"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106156"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106155"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106155"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106167"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106155"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-860"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Char
forall a. String -&gt; String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#streamError"><span class="hs-identifier hs-var">streamError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;index&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Index too large&quot;</span></span><span>
</span><span id="line-861"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106154"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106154"><span class="hs-identifier hs-var">s'</span></a></span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; Char
</span><a href="#local-6989586621679106163"><span class="hs-identifier hs-var">loop_index</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106156"><span class="hs-identifier hs-var">n</span></a></span><span>    </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106154"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-862"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106153"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106153"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106152"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106152"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106156"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106153"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-863"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; Char
</span><a href="#local-6989586621679106163"><span class="hs-identifier hs-var">loop_index</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106156"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106152"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-864"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#indexI"><span class="hs-pragma hs-type">indexI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-865"></span><span>
</span><span id="line-866"></span><span class="hs-comment">-- | /O(n)/ 'filter', applied to a predicate and a stream,</span><span>
</span><span id="line-867"></span><span class="hs-comment">-- returns a stream containing those characters that satisfy the</span><span>
</span><span id="line-868"></span><span class="hs-comment">-- predicate.</span><span>
</span><span id="line-869"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#filter"><span class="hs-identifier hs-type">filter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-870"></span><span id="filter"><span class="annot"><span class="annottext">filter :: (Char -&gt; Bool) -&gt; Stream Char -&gt; Stream Char
</span><a href="Data.Text.Internal.Fusion.Common.html#filter"><span class="hs-identifier hs-var hs-var">filter</span></a></span></span><span> </span><span id="local-6989586621679106151"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106151"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106149"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106149"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106148"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106148"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106147"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106147"><span class="hs-identifier hs-var">len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-871"></span><span>    </span><span class="annot"><span class="annottext">(s -&gt; Step s Char) -&gt; s -&gt; Size -&gt; Stream Char
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106146"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106148"><span class="hs-identifier hs-var">s0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106147"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="Data.Text.Internal.Fusion.Size.html#unknownSize"><span class="hs-identifier hs-var">unknownSize</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- HINT maybe too high</span><span>
</span><span id="line-872"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-873"></span><span>    </span><span id="local-6989586621679106146"><span class="annot"><span class="annottext">next :: s -&gt; Step s Char
</span><a href="#local-6989586621679106146"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106145"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106145"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106149"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106145"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-874"></span><span>                </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step s Char
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-875"></span><span>                </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106144"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106144"><span class="hs-identifier hs-var">s'</span></a></span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106144"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-876"></span><span>                </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106143"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106143"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106142"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106142"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106151"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106143"><span class="hs-identifier hs-var">x</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; s -&gt; Step s Char
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106143"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106142"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-877"></span><span>                           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span>    </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106142"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-878"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#filter"><span class="hs-pragma hs-type">filter</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-879"></span><span>
</span><span id="line-880"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-881"></span><span>  </span><span class="annot"><span class="hs-pragma">&quot;STREAM filter/filter fusion&quot;</span></span><span> </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621679106141"><span class="annot"><a href="#local-6989586621679106141"><span class="hs-pragma hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679106140"><span class="annot"><a href="#local-6989586621679106140"><span class="hs-pragma hs-var">q</span></a></span></span><span> </span><span id="local-6989586621679106139"><span class="annot"><a href="#local-6989586621679106139"><span class="hs-pragma hs-var">s</span></a></span></span><span class="hs-pragma">.</span><span>
</span><span id="line-882"></span><span>  </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#filter"><span class="hs-pragma hs-type">filter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106141"><span class="hs-pragma hs-type">p</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#filter"><span class="hs-pragma hs-type">filter</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106140"><span class="hs-pragma hs-type">q</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106139"><span class="hs-pragma hs-type">s</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#filter"><span class="hs-pragma hs-type">filter</span></a></span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">\</span><span id="local-6989586621679106138"><span class="annot"><a href="#local-6989586621679106138"><span class="hs-pragma hs-var">x</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106140"><span class="hs-pragma hs-type">q</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106138"><span class="hs-pragma hs-type">x</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-pragma hs-type">&amp;&amp;</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106141"><span class="hs-pragma hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106138"><span class="hs-pragma hs-type">x</span></a></span><span class="hs-pragma">)</span><span> </span><span class="annot"><a href="#local-6989586621679106139"><span class="hs-pragma hs-type">s</span></a></span><span>
</span><span id="line-883"></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-884"></span><span>
</span><span id="line-885"></span><span class="hs-comment">-- | The 'findIndexI' function takes a predicate and a stream and</span><span>
</span><span id="line-886"></span><span class="hs-comment">-- returns the index of the first element in the stream satisfying the</span><span>
</span><span id="line-887"></span><span class="hs-comment">-- predicate.</span><span>
</span><span id="line-888"></span><span id="local-6989586621679106959"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#findIndexI"><span class="hs-identifier hs-type">findIndexI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106959"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106959"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-889"></span><span id="findIndexI"><span class="annot"><span class="annottext">findIndexI :: forall a. Integral a =&gt; (Char -&gt; Bool) -&gt; Stream Char -&gt; Maybe a
</span><a href="Data.Text.Internal.Fusion.Common.html#findIndexI"><span class="hs-identifier hs-var hs-var">findIndexI</span></a></span></span><span> </span><span id="local-6989586621679106135"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106135"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679106134"><span class="annot"><span class="annottext">Stream Char
</span><a href="#local-6989586621679106134"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; Stream Char -&gt; [a]
forall a. Integral a =&gt; (Char -&gt; Bool) -&gt; Stream Char -&gt; [a]
</span><a href="Data.Text.Internal.Fusion.Common.html#findIndicesI"><span class="hs-identifier hs-var">findIndicesI</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106135"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Stream Char
</span><a href="#local-6989586621679106134"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-890"></span><span>                  </span><span class="hs-special">(</span><span id="local-6989586621679106132"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106132"><span class="hs-identifier hs-var">i</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106132"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-891"></span><span>                  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-892"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#findIndexI"><span class="hs-pragma hs-type">findIndexI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-893"></span><span>
</span><span id="line-894"></span><span class="hs-comment">-- | The 'findIndicesI' function takes a predicate and a stream and</span><span>
</span><span id="line-895"></span><span class="hs-comment">-- returns all indices of the elements in the stream satisfying the</span><span>
</span><span id="line-896"></span><span class="hs-comment">-- predicate.</span><span>
</span><span id="line-897"></span><span id="local-6989586621679106957"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#findIndicesI"><span class="hs-identifier hs-type">findIndicesI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106957"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679106957"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-898"></span><span id="findIndicesI"><span class="annot"><span class="annottext">findIndicesI :: forall a. Integral a =&gt; (Char -&gt; Bool) -&gt; Stream Char -&gt; [a]
</span><a href="Data.Text.Internal.Fusion.Common.html#findIndicesI"><span class="hs-identifier hs-var hs-var">findIndicesI</span></a></span></span><span> </span><span id="local-6989586621679106128"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106128"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106125"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106125"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106124"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106124"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106123"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106123"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; [a]
forall {a}. Num a =&gt; a -&gt; s -&gt; [a]
</span><a href="#local-6989586621679106122"><span class="hs-identifier hs-var">loop_findIndex</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106124"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-899"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-900"></span><span>    </span><span id="local-6989586621679106122"><span class="annot"><span class="annottext">loop_findIndex :: a -&gt; s -&gt; [a]
</span><a href="#local-6989586621679106122"><span class="hs-identifier hs-var hs-var">loop_findIndex</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106116"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106116"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106115"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106115"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106125"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106115"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-901"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-902"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106114"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106114"><span class="hs-identifier hs-var">s'</span></a></span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; [a]
</span><a href="#local-6989586621679106122"><span class="hs-identifier hs-var">loop_findIndex</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106116"><span class="hs-identifier hs-var">i</span></a></span><span>     </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106114"><span class="hs-identifier hs-var">s'</span></a></span><span> </span><span class="hs-comment">-- hmm. not caught by QC</span><span>
</span><span id="line-903"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106113"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106113"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106112"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106112"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679106128"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106113"><span class="hs-identifier hs-var">x</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106116"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; [a]
</span><a href="#local-6989586621679106122"><span class="hs-identifier hs-var">loop_findIndex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106116"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106112"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-904"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; [a]
</span><a href="#local-6989586621679106122"><span class="hs-identifier hs-var">loop_findIndex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106116"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106112"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-905"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#findIndicesI"><span class="hs-pragma hs-type">findIndicesI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-906"></span><span>
</span><span id="line-907"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-908"></span><span class="hs-comment">-- * Zipping</span><span>
</span><span id="line-909"></span><span>
</span><span id="line-910"></span><span class="hs-comment">-- | Strict triple.</span><span>
</span><span id="line-911"></span><span class="hs-keyword">data</span><span> </span><span id="Zip"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Zip"><span class="hs-identifier hs-var">Zip</span></a></span></span><span> </span><span id="local-6989586621679106946"><span class="annot"><a href="#local-6989586621679106946"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621679106945"><span class="annot"><a href="#local-6989586621679106945"><span class="hs-identifier hs-type">b</span></a></span></span><span> </span><span id="local-6989586621679106944"><span class="annot"><a href="#local-6989586621679106944"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Z1"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Z1"><span class="hs-identifier hs-var">Z1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106946"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106945"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-912"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span id="Z2"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Z2"><span class="hs-identifier hs-var">Z2</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106946"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106945"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679106944"><span class="hs-identifier hs-type">m</span></a></span><span>
</span><span id="line-913"></span><span>
</span><span id="line-914"></span><span class="hs-comment">-- | zipWith generalises 'zip' by zipping with the function given as</span><span>
</span><span id="line-915"></span><span class="hs-comment">-- the first argument, instead of a tupling function.</span><span>
</span><span id="line-916"></span><span id="local-6989586621679106952"><span id="local-6989586621679106953"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#zipWith"><span class="hs-identifier hs-type">zipWith</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679106953"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106953"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106952"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106953"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106953"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106952"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-917"></span><span id="zipWith"><span class="annot"><span class="annottext">zipWith :: forall a b. (a -&gt; a -&gt; b) -&gt; Stream a -&gt; Stream a -&gt; Stream b
</span><a href="Data.Text.Internal.Fusion.Common.html#zipWith"><span class="hs-identifier hs-var hs-var">zipWith</span></a></span></span><span> </span><span id="local-6989586621679106109"><span class="annot"><span class="annottext">a -&gt; a -&gt; b
</span><a href="#local-6989586621679106109"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106108"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106108"><span class="hs-identifier hs-var">next0</span></a></span></span><span> </span><span id="local-6989586621679106107"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106107"><span class="hs-identifier hs-var">sa0</span></a></span></span><span> </span><span id="local-6989586621679106106"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106106"><span class="hs-identifier hs-var">len1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106105"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106105"><span class="hs-identifier hs-var">next1</span></a></span></span><span> </span><span id="local-6989586621679106104"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106104"><span class="hs-identifier hs-var">sb0</span></a></span></span><span> </span><span id="local-6989586621679106103"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106103"><span class="hs-identifier hs-var">len2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-918"></span><span>    </span><span class="annot"><span class="annottext">(Zip s s a -&gt; Step (Zip s s a) b) -&gt; Zip s s a -&gt; Size -&gt; Stream b
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">Zip s s a -&gt; Step (Zip s s a) b
</span><a href="#local-6989586621679106102"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; s -&gt; Zip s s a
forall a b m. a -&gt; b -&gt; Zip a b m
</span><a href="Data.Text.Internal.Fusion.Common.html#Z1"><span class="hs-identifier hs-var">Z1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106107"><span class="hs-identifier hs-var">sa0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106104"><span class="hs-identifier hs-var">sb0</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Size -&gt; Size -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Size.html#smaller"><span class="hs-identifier hs-var">smaller</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106106"><span class="hs-identifier hs-var">len1</span></a></span><span> </span><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106103"><span class="hs-identifier hs-var">len2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-919"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-920"></span><span>      </span><span id="local-6989586621679106102"><span class="annot"><span class="annottext">next :: Zip s s a -&gt; Step (Zip s s a) b
</span><a href="#local-6989586621679106102"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Z1"><span class="hs-identifier hs-type">Z1</span></a></span><span> </span><span id="local-6989586621679106101"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106101"><span class="hs-identifier hs-var">sa</span></a></span></span><span> </span><span id="local-6989586621679106100"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106100"><span class="hs-identifier hs-var">sb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106108"><span class="hs-identifier hs-var">next0</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106101"><span class="hs-identifier hs-var">sa</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-921"></span><span>                          </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (Zip s s a) b
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-922"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106099"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106099"><span class="hs-identifier hs-var">sa'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Zip s s a -&gt; Step (Zip s s a) b
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; s -&gt; Zip s s a
forall a b m. a -&gt; b -&gt; Zip a b m
</span><a href="Data.Text.Internal.Fusion.Common.html#Z1"><span class="hs-identifier hs-var">Z1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106099"><span class="hs-identifier hs-var">sa'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106100"><span class="hs-identifier hs-var">sb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-923"></span><span>                          </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106098"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106098"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679106097"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106097"><span class="hs-identifier hs-var">sa'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Zip s s a -&gt; Step (Zip s s a) b
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; s -&gt; a -&gt; Zip s s a
forall a b m. a -&gt; b -&gt; m -&gt; Zip a b m
</span><a href="Data.Text.Internal.Fusion.Common.html#Z2"><span class="hs-identifier hs-var">Z2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106097"><span class="hs-identifier hs-var">sa'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106100"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106098"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-924"></span><span>
</span><span id="line-925"></span><span>      </span><span class="annot"><a href="#local-6989586621679106102"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#Z2"><span class="hs-identifier hs-type">Z2</span></a></span><span> </span><span id="local-6989586621679106096"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106096"><span class="hs-identifier hs-var">sa'</span></a></span></span><span> </span><span id="local-6989586621679106095"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106095"><span class="hs-identifier hs-var">sb</span></a></span></span><span> </span><span id="local-6989586621679106094"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106094"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679106105"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106095"><span class="hs-identifier hs-var">sb</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-926"></span><span>                             </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step (Zip s s a) b
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-927"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679106093"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106093"><span class="hs-identifier hs-var">sb'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Zip s s a -&gt; Step (Zip s s a) b
forall s a. s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; s -&gt; a -&gt; Zip s s a
forall a b m. a -&gt; b -&gt; m -&gt; Zip a b m
</span><a href="Data.Text.Internal.Fusion.Common.html#Z2"><span class="hs-identifier hs-var">Z2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106096"><span class="hs-identifier hs-var">sa'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106093"><span class="hs-identifier hs-var">sb'</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106094"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-928"></span><span>                             </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106092"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106092"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679106091"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106091"><span class="hs-identifier hs-var">sb'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">b -&gt; Zip s s a -&gt; Step (Zip s s a) b
forall s a. a -&gt; s -&gt; Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; b
</span><a href="#local-6989586621679106109"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106094"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106092"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; s -&gt; Zip s s a
forall a b m. a -&gt; b -&gt; Zip a b m
</span><a href="Data.Text.Internal.Fusion.Common.html#Z1"><span class="hs-identifier hs-var">Z1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106096"><span class="hs-identifier hs-var">sa'</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106091"><span class="hs-identifier hs-var">sb'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-929"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#zipWith"><span class="hs-pragma hs-type">zipWith</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-930"></span><span>
</span><span id="line-931"></span><span class="hs-comment">-- | /O(n)/ The 'countCharI' function returns the number of times the</span><span>
</span><span id="line-932"></span><span class="hs-comment">-- query element appears in the given stream.</span><span>
</span><span id="line-933"></span><span id="local-6989586621679106943"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#countCharI"><span class="hs-identifier hs-type">countCharI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679106943"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106943"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-934"></span><span id="countCharI"><span class="annot"><span class="annottext">countCharI :: forall a. Integral a =&gt; Char -&gt; Stream Char -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#countCharI"><span class="hs-identifier hs-var hs-var">countCharI</span></a></span></span><span> </span><span id="local-6989586621679106087"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106087"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679106084"><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106084"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span id="local-6989586621679106083"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106083"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span id="local-6989586621679106082"><span class="annot"><span class="annottext">Size
</span><a href="#local-6989586621679106082"><span class="hs-identifier hs-var">_len</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; a
forall {a}. Num a =&gt; a -&gt; s -&gt; a
</span><a href="#local-6989586621679106081"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106083"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-935"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-936"></span><span>    </span><span id="local-6989586621679106081"><span class="annot"><span class="annottext">loop :: a -&gt; s -&gt; a
</span><a href="#local-6989586621679106081"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106076"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106076"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621679106075"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106075"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">s -&gt; Step s Char
</span><a href="#local-6989586621679106084"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106075"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-937"></span><span>      </span><span class="annot"><span class="annottext">Step s Char
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106076"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-938"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span>    </span><span id="local-6989586621679106074"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106074"><span class="hs-identifier hs-var">s'</span></a></span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; a
</span><a href="#local-6989586621679106081"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106076"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106074"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-939"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679106073"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106073"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679106072"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106072"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106087"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679106073"><span class="hs-identifier hs-var">x</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; a
</span><a href="#local-6989586621679106081"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106076"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106072"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-940"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; s -&gt; a
</span><a href="#local-6989586621679106081"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679106076"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679106072"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-941"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#countCharI"><span class="hs-pragma hs-type">countCharI</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-942"></span><span>
</span><span id="line-943"></span><span id="local-6989586621679107057"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#streamError"><span class="hs-identifier hs-type">streamError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107057"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-944"></span><span id="streamError"><span class="annot"><span class="annottext">streamError :: forall a. String -&gt; String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#streamError"><span class="hs-identifier hs-var hs-var">streamError</span></a></span></span><span> </span><span id="local-6989586621679106069"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679106069"><span class="hs-identifier hs-var">func</span></a></span></span><span> </span><span id="local-6989586621679106068"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679106068"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">P.error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; a) -&gt; String -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Data.Text.Internal.Fusion.Common.&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679106069"><span class="hs-identifier hs-var">func</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679106068"><span class="hs-identifier hs-var">msg</span></a></span><span>
</span><span id="line-945"></span><span>
</span><span id="line-946"></span><span id="local-6989586621679107054"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-type">emptyError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679107054"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-947"></span><span id="emptyError"><span class="annot"><span class="annottext">emptyError :: forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#emptyError"><span class="hs-identifier hs-var hs-var">emptyError</span></a></span></span><span> </span><span id="local-6989586621679106066"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679106066"><span class="hs-identifier hs-var">func</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; a
forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#internalError"><span class="hs-identifier hs-var">internalError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679106066"><span class="hs-identifier hs-var">func</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Empty input&quot;</span></span><span>
</span><span id="line-948"></span><span>
</span><span id="line-949"></span><span id="local-6989586621679106064"><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#internalError"><span class="hs-identifier hs-type">internalError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679106064"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-950"></span><span id="internalError"><span class="annot"><span class="annottext">internalError :: forall a. String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#internalError"><span class="hs-identifier hs-var hs-var">internalError</span></a></span></span><span> </span><span id="local-6989586621679106063"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679106063"><span class="hs-identifier hs-var">func</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; a
forall a. String -&gt; String -&gt; a
</span><a href="Data.Text.Internal.Fusion.Common.html#streamError"><span class="hs-identifier hs-var">streamError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679106063"><span class="hs-identifier hs-var">func</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Internal error&quot;</span></span><span>
</span><span id="line-951"></span><span>
</span><span id="line-952"></span><span class="annot"><a href="Data.Text.Internal.Fusion.Common.html#int64ToSize"><span class="hs-identifier hs-type">int64ToSize</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>
</span><span id="line-953"></span><span id="int64ToSize"><span class="annot"><span class="annottext">int64ToSize :: Int64 -&gt; Size
</span><a href="Data.Text.Internal.Fusion.Common.html#int64ToSize"><span class="hs-identifier hs-var hs-var">int64ToSize</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Size
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-954"></span></pre></body></html>